How many elements can be stored in an array declared as int marks[25]?

Options

  • A. 24
  • B. 25
  • C. 26
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. 25

Detailed Explanation

Answer: (B) 25

The number written inside the brackets during an array declaration specifies the number of elements.

Therefore:

int marks[25];

can store exactly 25 integer elements.

The valid indexes range from 0 to 24.

Do not confuse the number of elements with the last index. For 25 elements, the last index is 24.