What is the output of the following statement:

ICSE Class 10 Computer Applications PYQ · 2025 Improvement · Section A

1(v)1 Mark · 2025 · Section A · 2025 Improvement

What is the output of the following statement:

“MONOPOLY”.lastIndexOf(‘O’);

Show SolutionHide Solution↓

5

Reason — In the string "MONOPOLY", the character 'O' occurs at indexes 1, 3, and 5 (indexing starts from 0). The lastIndexOf('O') method returns the last occurrence of 'O', which is at index 5.

← Previous questionNext question →

Share on WhatsApp

Browse the free Computer Applications sample bank