1.

Which method among the following returns the integer if no character is available?(a) int peek()(b) int read()(c) string ReadLine()(d) none of the mentionedI have been asked this question in an internship interview.My question is from Character Stream in division Console I/O Operations and Stream Classes of C#

Answer»

The correct CHOICE is (a) int peek()

The best EXPLANATION: OBTAINS the next character from the input STREAM, but does not remove that character. RETURNS –1 if no character is available.



Discussion

No Comment Found

Related InterviewSolutions