Cambridge IGCSE Computer Science · Syllabus 0478 · Programming
Two-Dimensional Array
What is Two-Dimensional Array?
An array declared with two pairs of bounds and pictured as a grid of rows and columns; each element is selected with one index for each dimension and the whole structure is traversed with nested iteration.
This definition is part of the Programming chapter in Cambridge IGCSE Computer Science.
Two-Dimensional Array in context
A two-dimensional array is declared with two pairs of bounds: DECLARE <identifier> : ARRAY[<l1>:<u1>, <l2>:<u2>] OF <data type>. It is usually pictured as a grid of rows and columns. A single element is selected with one index value for each dimension, written in the declared order: NoughtsAndCrosses[2,3]. Visiting every element needs nested iteration — one loop for the first dimension and one for the second — and which loop is on the outside decides whether you travel row by row or column by column.

