MCQ Single Best Answer Moderate

QThe index (subscript) of the last element of an array ar[] is:

ID: #24161 ICSE Computer Application - Class X - 2025 PYQ 73 views
Question Info
#24161Q ID
ModerateDifficulty
ICSE Computer Application - Class X - 2025 PYQTopic

Choose the Best Option

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

  • A ar.length()
  • B ar[].length
  • C ar.length() - 1
  • D ar.length - 1
Correct Answer: Option D

Explanation

(d) ar.length - 1
Explanation: The last index of an array is always length - 1 (since array indices start at 0).

Share This Question

Challenge a friend or share with your study group.