Saturday, 25 February 2017

GATE EXAM PREPARATION IN "C" - file -handling

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.

No comments:

Post a Comment