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

ICSE Class 10 Computer Applications PYQ · 2023 Paper · Section A

1(xii)1 Mark · 2023 · Section A · 2023 Paper

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

Show SolutionHide Solution↓

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.

← Previous questionNext question →

Browse the free Computer Applications sample bank