Single Choice Moderate

QThe output of the function "COMPOSITION".substring(3, 6):

ID: #23954 ICSE Computer Application - Class X - 2023 PYQ 86 views
Question Info
#23954Q ID
ModerateDifficulty
ICSE Computer Application - Class X - 2023 PYQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A POSI
  • B POS
  • C MPO
  • D MPOS
Correct Answer

Explanation

POS

Reason — The substring() method returns a substring beginning from the startindex and extending to the character at endIndex - 1. Since a string index begins at 0, the character at index 3 is 'P' and the character at index 5 (6-1 = 5) is 'S'. Thus, "POS" is extracted.

Share This Question

Challenge a friend or share with your study group.