Vidyalelo
Java Programming · Q51

Input Output

Programming · Java Programming · question 51

Q51

What will be the output of the following Java program if input given is "abc'def/'egh"? class Input_Output public static void main(String args[]) throws IOException char c; BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); do c = (char) obj.read(); System.out.print(c); while(c != '\'');

A.
abc'
Answer
B.
abcdef/'
C.
abc'def/'egh
D.
abcqfghq

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board