1.

Which of these methods are used to read in from file?(a) get()(b) read()(c) scan()(d) readFileInput()

Answer» Right choice is (b) read()

To explain: 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