Declaring a 1D array: DECLARE name : ARRAY[l:u] OF type
Declares a 1D array named StudentNames with indexes 1 to 30 (lower:upper), each element holding a STRING. It only sets up the array; no values are stored yet.
Understanding Declaring a 1D array: DECLARE name : ARRAY[l:u] OF type in IGCSE Computer Science Paper 2
What it does: [1:30] shows the lower bound 1, a colon, then the upper bound 30, all inside square brackets. The DECLARE line only creates the empty array. The second line is a separate assignment that stores the value 15 in element 1. A declaration does not store any values. You must assign values to the elements yourself before using them. The data type comes at the end, after the word OF: ARRAY[l:u] OF type. Cambridge pseudocode uses OF: ARRAY[1:30] OF STRING. AS is not part of this syntax. The numbers 1:7 are the lower and upper bounds (indexes 1 to 7), not stored values. The array has 7 elements, each able to hold a REAL.
Common mistakes: The array was declared with indexes 1 to 5, so index 6 is above the upper bound and is out of range. The line should be G[5] ← 'B'. The lower and upper bounds must be separated by a colon, not a comma. It should be ARRAY[1:7].
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 439–448) 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
DECLARE StudentNames : ARRAY[1:30] OF STRINGFill in the Blanks
Spot the Error
Student with a class code? Join your class →