fflush

Full prototype:

int fflush(FILE*);  

Purpose and Notes:

Takes any output pending for the stream pointed to by the first parameter's FILE* and writes it immediately.

If the stream is input or if it's update (+) and the last operation was to read from it- then the call to the fflush() function is implementation defined.

Returns:

int- Returns zero on success and EOF otherwise.

Argument 1:

FILE*- A stream/file to write the buffered data to.

Example 1