When working with binary files, the ________ function can be used to read data in a structured manner.

  • fread()
  • fgets()
  • fgetc()
  • fscanf()
The correct option is fread(). This function is specifically designed for reading binary data from a file. It takes parameters like the file pointer, size of each element, number of elements, and the destination buffer where the data will be stored. This makes it suitable for structured reading of binary files.
Add your answer
Loading...

Leave a comment

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