adplus-dvertising
frame-decoration

Question

What is the output of this 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’

b.

abcdef/’

c.

abc’def/’egh

d.

abcqfghq

Posted under Java Programming

Answer: (a).abc’

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program if input given is “abc’def/’egh”?