Home » JAVA Programming » Files and I/O » Question
  1. What is the output of this program if input given is “InterviewMania”?
    import java.util.*;
    import java.io.*;
    public class IO_Example
    {
    public static void main(String args[]) throws IOException
    {
    char ch;
    BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
    do
    {
    ch = (char) obj.read();
    System.out.print(ch);
    } while(ch!='w');
    }
    }
    1. InterviewMania
    2. Mania
    3. Interview
    4. ManiaInterview
    5. None of these
Correct Option: C

Interview



Your comments will be displayed only after manual approval.