What function is used to open a binary file for both reading and writing in C?
- fopen()
- open()
- openfile()
- readfile()
In C, the fopen() function is used to open a binary file for both reading and writing. It returns a file pointer, which is essential for performing file operations.
Loading...
Related Quiz
- What is the primary function of pointers in C?
- What will happen if the condition in a 'while' loop is initially false?
- You're working on an application that processes large datasets. Why might you choose to use pointers to arrays instead of traditional arrays?
- What is the time complexity of the bubble sort algorithm in the best case?
- In an application that writes user data to a text file, what precaution should be taken to avoid data corruption or loss?