1.

Choose the output returned when read() reads the character from the console?(a) String(b) Char(c) Integer(d) BooleanThis question was posed to me in a job interview.This intriguing question originated from Introduction of Console I/O Operations in division Console I/O Operations and Stream Classes of C#

Answer»

The CORRECT option is (c) Integer

The BEST explanation: Read() returns the character read from the console. It returns the RESULT. The character is returned as an int, which should be CAST to char.



Discussion

No Comment Found

Related InterviewSolutions