fflush Function

Flushes the buffer in the specified stream.

Attention: This function is not implemented by MPLAB XC8 for PIC MCUs. It is implemented by all other compilers, but MPLAB XC8 for AVR MCUs has limited support of data streams.

Include

<stdio.h>

Prototype

int fflush(FILE * stream);

Argument

 stream pointer to the stream to flush

Return Value

Returns EOF if a write error occurs; otherwise, returns zero for success.

Remarks

If stream is a null pointer, all output buffers are written to files. The fflush function has no effect on an unbuffered stream.