StudyBrixFree worksheets, study guides and courses

Computer science · Grades 6–9

Zero-based array indexing

An index of zero refers to the first position, not the second.

Make a worksheet

The key idea

An index of zero refers to the first position, not the second.

first item → index 0

Worked examples

Using zero-based indexing, what is values[3] for values = [29, 32, 60, 98, 68]?

index 3 → 98

98

Using zero-based indexing, what is values[0] for values = [68, 90, 22, 95, 91]?

index 0 → 68

68

Try it yourself

  1. Using zero-based indexing, what is values[3] for values = [88, 19, 32, 29, 69]?

  2. Using zero-based indexing, what is values[4] for values = [75, 36, 40, 3, 40]?

Check your understanding

Answers and marking notes
  1. 29

    index 3 → 29

  2. 40

    index 4 → 40

Learning preview · teacher review required. Grade bands are approximate, not official curriculum alignment.