In C, if you want to ensure that all the data written to a file is physically stored, you can use the ______ function.

  • fwrite()
  • fflush()
  • fseek()
  • fsync()
The correct option is b) fflush(). This function flushes the output buffer, ensuring that all data is physically stored in the file.
Add your answer
Loading...

Leave a comment

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