1.

Name the method which returns integer as -1 when the end of file is encountered.(a) int read()(b) int ReadByte()(c) void readbyte()(d) none of the mentionedThe question was asked during an interview.The origin of the question is Introduction of Stream Classes topic in section Console I/O Operations and Stream Classes of C#

Answer»

The correct option is (b) int ReadByte()

Easy EXPLANATION - Returns an integer representation of the next available BYTE of input. Returns –1 when the end of the FILE is ENCOUNTERED.



Discussion

No Comment Found

Related InterviewSolutions