Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 1 of 3.
An enumerated data type is a user-defined (non-composite) type with an ordered list of possible values [1]
A pointer data type is a user-defined (non-composite) type used to reference a memory location [1]
TYPE Quarter1 = (January, February, March)
TYPE Quarter1 = [1]
(January, February, March) [1]
DECLARE Pet1 : Pet
Variable declared with the type Pet [1]
Pet1.PetName ← "Tibbles" Pet1.AnimalType ← "Cat" Pet1.PetAge ← 8 Pet1.PetGender ← 'M' Pet1.OwnerName ← "Jasmine Smith"
All three string values (PetName, AnimalType, OwnerName) assigned in quotes [1]
Char value 'M' assigned in single quotes [1]
Integer 8 assigned with no quotes [1]
▶ Whole paper
Video solution of the whole paper · by MAK CS. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.