Declaring a 1D array
Creates a fixed-length array. Its 30 elements are numbered from lower bound 1 to upper bound 30, and every element holds the same data type, here STRING.
Understanding Declaring a 1D array in IGCSE Computer Science Paper 2
What it does: [1:10] gives the lower bound 1 and upper bound 10 using a colon, which is the required form of the bounds. OF STRING sets the data type for all 20 elements, so none of them can hold a different type. The elements are numbered 1 to 30, so there are 30 of them. The keyword OF must come between the brackets and the data type. Pseudocode keywords such as DECLARE, ARRAY, OF and STRING are written in upper case. The lower bound is stated as 1, so numbering starts at 1. Element 0 does not exist in this array. The bounds 1:30 give 30 elements numbered 1 to 30, and OF STRING means every element holds a string.
Common mistakes: The array is declared with bounds 1:7, so the upper bound is 7. Index 8 does not exist. It should be an index from 1 to 7, such as T[3] ← 19.5. The bounds of an array must be written in square brackets, not round brackets. 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 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
DECLARE StudentNames : ARRAY[1:30] OF STRINGFill in the Blanks
Spot the Error
Student with a class code? Join your class →