MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2025 PYQ

Q

System.out.println("I said,\"It\'s wise to obey elders.\"");
The output of the above statement is:

Question ID
#24166
Subchapter
ICSE Computer Application - Class X - 2025 PYQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A I said,'It is wise to obey elders.'
  • B I said, "It's wise to obey elders."
  • C I said, It's wise to elders.
  • D "It's wise to obey elders."
Correct Answer: B

Explanation

(b) I said, "It's wise to obey elders."
Explanation:

  • \" is used to escape double quotes inside a string.

  • \' is used to escape a single quote inside a string.

  • The correct output includes both escaped characters properly:

Share This Question

Share this MCQ with your friends or study group.