MCQ Single Best Answer Moderate

QThe second last element of an array of size 100 has index:

ID: #23880 ICSE Computer Application - Class X - Selection Examination - 2024-25 - MCQ - CALCUTTA PUBLIC SCHOOL 127 views
Question Info
#23880Q ID
ModerateDifficulty
ICSE Computer Application - Class X - Selection Examination - 2024-25 - MCQ - CALCUTTA PUBLIC SCHOOLTopic

Choose the Best Option

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

  • A 97
  • B 98
  • C 99
  • D 100
Correct Answer: Option B

Explanation

Explanation:

 

Array indexing in Java starts from 0.

For an array of size 100, the last element has index 99.

The second last element has index 98.

Share This Question

Challenge a friend or share with your study group.