C | File Handling | Question 2
When fopen() is not able to open a file, it returns
(A) EOF
(B) NULL
(C) Runtime Error
(D) Compiler Dependent
Answer: (B)
Explanation: fopen() returns NULL if it is not able to open the given file due to any of the reasons like file not present, inappropriate permissions, etc.
Quiz of this Question
Recommended Posts:
- C | File Handling | Question 3
- C | File Handling | Question 1
- C | File Handling | Question 5
- C | File Handling | Question 4
- Basics of File Handling in C#
- Basics of File Handling in C
- Four File Handling Hacks which every C/C++ Programmer should know
- C++ | Exception Handling | Question 1
- C++ | Exception Handling | Question 12
- C++ | Exception Handling | Question 8
- C++ | Exception Handling | Question 9
- C++ | Exception Handling | Question 5
- C++ | Exception Handling | Question 6
- C++ | Exception Handling | Question 11
- C++ | Exception Handling | Question 2



