Multiple choice

An array element is accessed using _______.

  1. the first-in first-out approach

  2. the dot operator

  3. a member name

  4. an index number

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Array elements are accessed using an index number that specifies the position of the element within the array. In most languages including C++, array indices start at 0, so the first element has index 0, the second has index 1, and so on.