9618/31/O/N/21 question 3: worked solution (October/November 2021, paper 31)

Show as plain text

Cambridge A2 Level Computer Science 9618 · 13.1 User-defined data types Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 1 of 3. Q2 9618/31/O/N/21 original Q3 Structured · 4 marks Worked solution (a) TYPE Parts = (Monitor, CPU, SSD, HDD, LaserPrinter, Keyboard, Mouse) TYPE Parts = written correctly [1] All seven values listed in brackets, separated by commas [1] (b) TYPE SelectParts = ^Parts TYPE SelectParts = ^ (the ^ shows a pointer) [1] The type it points to is Parts [1] KEY IDEA An enumerated type lists values; a pointer type is written with ^ followed by the type it points to. TOTAL 4 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by qiphyedu. Tap the picture to open it on YouTube.