cpp/io/c/fflush

For output streams (and for update streams on which the last operation was output), writes any unwritten data from the 's buffer to the associated output device.

For input streams (and for update streams on which the last operation was input), the behavior is undefined.

If is a null pointer, all open output streams are flushed, including the ones manipulated within library packages or otherwise not directly accessible to the program.

Return value
Returns zero on success. Otherwise eof is returned and the error indicator of the file stream is set.