MCQ Single Best Answer Moderate

Q

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

ID: #24166 ICSE Computer Application - Class X - 2025 PYQ 80 views
Question Info
#24166Q ID
ModerateDifficulty
ICSE Computer Application - Class X - 2025 PYQTopic

Choose the Best Option

Click any option to instantly check if you're 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: Option 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

Challenge a friend or share with your study group.