Everything

fclose


Closes a stream input/output file.

[Format]

#include <stdio.h>

long fclose (FILE *fp);

[Parameters]

fp File pointer

[Return values]

Normal: 0

Abnormal: Nonzero

[Remarks]

The fclose function closes the stream input/output file indicated by file pointer fp.

If the output file of the stream input/output file is open and data that is not output remains in the buffer, that data is output to the file before it is closed.

If the input/output buffer was automatically allocated by the system, it is released.