Answer to Question #24480 in C++ for H Zaman

Question #24480
what is function of the flush command?
Expert's answer
The fflush(FILE* stream) function or the flush() method of the C++ streams
forces the unwritten characters in the buffer to be written to the output stream.
For example if there are some characters left after writing to the stdout (console)
they will be immediately displayed, and the buffer of the output stream associated with the console
will be cleared. You might have also faced a situation when you input some data from the console,
but the input operations are sometimes skipped. In most cases it means
that there is still some data in the stdin buffer left from the previous input operations
(probably the newline '\n' character) and it doesn't let you to input another data.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog