When dealing with large files, what is the advantage of using fread and fwrite over fscanf and fprintf?
- fread and fwrite allow block-level operations.
- fscanf and fprintf are more efficient for large files.
- fread and fwrite provide better error handling.
- fscanf and fprintf simplify binary file handling.
The correct option is fread and fwrite allow block-level operations. Using these functions, data can be read or written in larger chunks, reducing the number of I/O operations and improving performance when dealing with large files in C.
Loading...
Related Quiz
- You are working on a program that processes large datasets. Why might you choose to use pointers and pointer arithmetic to traverse the data?
- How does C handle array indices that are out of bounds?
- What is a potential risk of using the gets() function for reading strings in C?
- What is the impact of using inline functions on the size of the compiled binary?
- What string handling function is used to concatenate two strings in C?