#include <stdio.h>int fflush(FILE *stream);
If stream is associated with a file opened for writing, a call to fflush( ) causes the contents of the output buffer to be physically written to the file. The file remains open.
A return value of zero indicates success; EOF indicates that a write error has occurred.
All buffers are automatically flushed upon normal termination of the program or when they are full. Also, closing a file flushes its buffer.
Related functions are fclose( ), fopen( ), fread( ), fwrite( ), getc( ), and putc( ).