Computer Applications

A single dimensional array contains N elements. What will be the last subscript?

  1. N
  2. N - 1
  3. N - 2
  4. N + 1

Java Arrays

ICSE 2022

5 Likes

Answer

N - 1

Reason — The index of an array begins from 0 and continues till Size - 1. Thus, if an array has N elements, the last subscript/index will be N - 1.

Answered By

5 Likes


Related Questions