Variables, constants and data types
Programs keep data in named storage locations. A variable’s value can change while the program runs; a constant’s value never changes. Each holds one data type. Paper 1 asks most years for the name of an identifier that always holds the same value: a constant.
By the end of this page you can
- Tell a variable from a constant
- Explain what initialising a variable means
- Choose a data type for a value
- Answer variable and data type questions
Goals tick themselves off as you try the activities below.

Photo: ArnoldReinhold, CC BY-SA 4.0, via Wikimedia Commons. Cropped, student’s name blurred, resized, JPEG q72.
Each column on the sheet is a storage location: some values change as the program runs, some never do.
How often it shows up in past papers
Paper 1 counts come from our past-paper bank of CSEC Information Technology Paper 1s. The last-5 row shows how often it came up in the five most recent papers.
Inside this topic
- Variables and constantsLocked
- Five data typesLocked
- Key termsLocked
- Test yourselfmarkedLocked
- Practise for real · 1 past questionLocked