Vidyalelo
Java Programming · Q41

Input Output

Programming · Java Programming · question 41

Q41

What will be the output of the following Java program if input given is 'abcqfghqbcd'? 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 != 'q');

A.
abcqfgh
B.
abc
C.
abcq
Answer
D.
abcqfghq

Answer: Option C

Solution

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