1.

Choose the output returned when an error condition is generated while read() reads from the console.(a) False(b) 0(c) -1(d) All of the mentionedThe question was asked in my homework.Question is from Introduction of Console I/O Operations topic in section Console I/O Operations and Stream Classes of C#

Answer»

Right OPTION is (c) -1

To explain I would say: READ() RETURNS –1 on ERROR. This method also throws an IOEXCEPTION on failure.



Discussion

No Comment Found

Related InterviewSolutions