C – Fclose

C – Fclose 2017-08-07T14:28:27+00:00

fclose()

The fclose function closes the file associated with stream and flushes its buffer (i.e., it writes any data still remaining in the disk buffer to the file). After a call to fclose(), stream is no longer connected with the file, and any automatically allocated buffers are de allocated.

Declaration:

int fclose (FILE *stream);

If fclose () is successful, zero is returned; otherwise EOF is returned.

C – FCLOSE FUNCTION EXAMPLE PROGRAM :

Prev Next