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

Question #24480
what is function of the flush command?
1
Expert's answer
2013-02-19T09:18:57-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS