What is the purpose of the fopen function in C?
- Closes a file
- Opens a file for both reading and writing
- Opens a file for reading
- Opens a file for writing
The fopen function in C is used to open a file for reading. It returns a file pointer that can be used to read data from the file.
Loading...
Related Quiz
- What would be the result of trying to access an array with a pointer that has not been initialized?
- In C, when an array is passed to a function, is it passed by value or by reference?
- What is the significance of using a pointer to a structure?
- In C programming, why would you use an enumeration (enum)?
- In C, a structure member with a specified width is known as a ________.