Which function in C is used to flush the output buffer of a stream?

  • clear()
  • fflush()
  • flush()
  • flushout()
The correct function is fflush(). It is used to flush the output buffer of a stream, ensuring that any buffered data is written to the file or output device. This is particularly useful when you want to ensure that data is immediately written without waiting for the buffer to fill up.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *