Array bounds starting at zero or one
The number before the colon is the lower bound, the first index. ARRAY[1:30] starts at 1, ARRAY[0:29] starts at 0. Both hold 30 elements, so always state the lower bound.
Understanding Array bounds starting at zero or one in IGCSE Computer Science Paper 2
What it does: The lower bound 1 is written in the declaration, so anyone reading it knows the first element is Names[1]. With ARRAY[0:29], the first element is at index 0, so Scores[0] outputs it. Count from lower to upper bound. 0 to 29 is 30 indexes and 1 to 30 is 30 indexes, so both hold 30 elements.
Common mistakes: The lower bound must come first, before the colon, and the upper bound after it. It should be ARRAY[1:5], which holds 5 elements. The bounds are 0 to 4, so index 5 is out of range. The first element is M[0], so the line should be M[0] ← 'A'.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 449–458) and word search (Modules 439–458).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
ARRAY[1:30]Fill in the Blanks
Spot the Error
Student with a class code? Join your class →