fclose си

Forums:

#include < stdio.h >
int fclose(FILE *stream);

закрывает файл.

A successful call to the fclose function causes the stream pointed to by stream to be
?ushed and the associated ?le to be closed. Any unwritten buffered data for the stream
are delivered to the host environment to be written to the ?le; any unread buffered data
are discarded. Whether or not the call succeeds, the stream is disassociated from the ?le
and any buffer set by the setbuf or setvbuf function is disassociated from the stream
(and deallocated if it was automatically allocated).
Returns
The fclose function returns zero if the stream was successfully closed, or EOF if any
errors were detected.