What is the return value of getc()?

Category: QuestionsWhat is the return value of getc()?
Editor">Editor Staff asked 11 months ago

What is the return value of getc()?
 
(a) The next character from the stream is not referred by file pointer
 
(b) EOF for end of file or error
 
(c) Nothing
 
(d) None of the mentioned
 
This question was posed to me by my college director while I was bunking the class.
 
My question comes from File Access topic in division Input and Output in C of C
NCERT Solutions for Subject Computer science (C Programming) Select the correct answer from above options 
Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

1 Answers
Editor">Editor Staff answered 11 months ago

Correct option is (b) EOF for end of file or error
 
The best explanation: None.