fflush()

This is a File I/O function. It is not implemented in the Compiler.

Syntax
  #include <stdio.h>

  
  int fflush(FILE *f);

  
Description

fflush() flushes the I/O buffer of file f, allowing a clean switch between reading and writing the same file. If the program was writing to file f, fflush() writes all buffered data to the file. If it was reading, fflush() discards any buffered data. If f is NULL, all files open for writing are flushed.

Return

Zero, if there was no error; EOF otherwise.

See also

setbuf() and

setvbuf()