clearerr
Syntax:
#include <stdio.h> void clearerr( FILE *stream ); The clearerr function resets the error flags and EOF indicator for the given stream. When an error occurs, you can use perror() to figure out which error actually occurred. |
#include <stdio.h> int fclose( FILE *stream );
The function fclose() closes the given file stream, deallocating any buffers associated with that stream. fclose() returns 0 upon success, and EOF otherwise.