2210/22/M/J/22 question 3: worked solution (May/June 2022, paper 22)
Show as plain textHide plain text
Cambridge O Level Computer Science 2210 · 8.2 Arrays Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 3. Q46 2210/22/M/J/22 original Q3 Structured · 5 marks Worked solution (a) Describe the array in these points, any two, plus an example: A list (one column) of items [1] All items have the same data type , stored under a single identifier , with an index to find each element [1] Example declaration: write DECLARE MyArray[1:10] OF INTEGER [1] (b) Use a counter as the index of the array [1] Put the counter in a loop and add 1 each time, so the same code can check every element in turn [1] KEY IDEA An array is a list of same-type items with an index, and a loop with a counter can visit each index. TOTAL 5 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.