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

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

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

Choose Your Answer

Click an option to check whether your answer is correct.

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

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

Share this MCQ with your friends or study group.