fflush
Flushes the output buffer of a stream
#include <stdio.h>
int fflush (
FILE *fp);
The fflush function returns nonzero if a write error occurs, and returns zero otherwise. If an error occurs, errno is set.
If the file pointed to by fp is open for output or update, the fflush function causes any unwritten data to be written to the file. If the file pointed to by fp is open for input or update, the fflush function undoes the effect of any preceding ungetc operation on the stream. If the value of fp is NULL, all open files are flushed.