Using an array element
Reads or changes one array element: the array name, then one index in square brackets. The index must be between the array's lower and upper bound. StudentNames[1] ← "Ali" stores a value.
Understanding Using an array element in IGCSE Computer Science Paper 2
What it does: StudentNames is the array name, [3] is the single index, and ← stores the new value "Mia" in that element. The index must be between the lower bound (1) and the upper bound (5). Index 6 is outside the range, so it causes an error. The index goes inside the square brackets and the new value goes on the right of the ← arrow. The index is a position number, not the value.
Common mistakes: An array index goes in square brackets, not round brackets. It should be Names[1] ← "Ali". The array name comes first, then the index in square brackets. It should be Scores[2] ← 15.
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 176–187) and word search (Modules 166–187).
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
StudentNames[1]Fill in the Blanks
Spot the Error
Student with a class code? Join your class →