Question
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 != '\'');
}
}
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 != '\'');
}
}
Answer: Option A
Was this answer helpful ?
`setminus`' is used for single quotes that is for representing ' .
Output:
$ javac Input_Output.java
$ java Input_Output
abc'
Was this answer helpful ?
More Questions on This Topic :
Question 10.
Which of the following statement is correct?
....
Submit Solution