1.

Which of these values is returned by read() method is end of file (EOF) is encountered?(a) 0(b) 1(c) -1(d) Null

Answer» Right option is (c) -1

The best explanation: Each time read() is called, it reads a single byte from the file and returns the byte as an integer value. read() returns -1 when the end of the file is encountered.


Discussion

No Comment Found

Related InterviewSolutions