Skip to content

1-D arrays: store, index, and traverse

Handout

A row of boxes

  • An array is a row of variables of the same type, kept side by side in memory.
  • int a[5]; makes room for five ints. They are one block, reached by number.
  • You can fill them when you create them: int a[] = {10, 20, 30}; makes an array of three.

Handout

Log in or create account

IGCSE & A-Level