Definition | #include <stdio.h> int fclose(FILE *fp);
| ||
Return val. | 0 EOF | The file has been closed.
| |
Notes | If the file pointer fp does not point to a FILE structure, the program aborts! Whenever a program is terminated normally or by means of | ||
Record I/O | Since data is not buffered in the case of record I/O, there is no internal call to the | ||
Example | The following program fragment closes the file pointed to by file pointer fp when the end of FILE *fp; if(feof(fp)) fclose(fp); | ||
See also | fflush, close, fdopen, fopen, fopen64, exit |