File I/O : C Language Tutorial
- open a file
To open a file you need to use the fopen function, which returns a FILE pointer as stated above. fclose returns zero if the file is closed properly.
Example:- FILE *fp; fp=fopen("c:\\new.txt", "w"); fprintf(fp, "New.\n");
Simple C Program to see how file handling works
COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM