MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER

Q A single dimensional array has 50 elements, which of the following is the correct statement to initialize the last element to 100.

Question ID
#24264
Subchapter
ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A x[51] = 100
  • B x[48] = 100
  • C x[49] = 100
  • D x[50] = 100
Correct Answer: C

Explanation

Given:

  • A single-dimensional array has 50 elements.

  • In Java, array indexing starts from 0.


Step 1: Determine last index

  • First element → x[0]

  • Second element → x[1]

  • Last (50th) element → x[49]

Remember: last index = total elements − 1


Step 2: Match with options

(a) x[51] = 100 → ❌ Out of bounds
(b) x[48] = 100 → ❌ 49th element, not last
(c) x[49] = 100 → ✅ Correct, last element
(d) x[50] = 100 → ❌ Out of bounds


Answer: (c) x[49] = 100

Share This Question

Share this MCQ with your friends or study group.