Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1DECLARE Marks : ARRAY[1:10] OF INTEGER | ACreates an array called Names with 30 items, all of them STRING, from index 1 to index 30 | |
| 2DECLARE Names : ARRAY[1:30] OF STRING | BDECLARE Scores : ARRAY[1:5] OF INTEGER | |
| 3The lower bound of a Cambridge array is 1, so the first item is at index 1 and the upper bound 5 gives 5 items | CCreates an array called Marks holding 10 whole numbers, numbered from index 1 to index 10 | |
| 4All items in an array must be the same data type, such as REAL numbers for prices | DCambridge arrays start at index 1, so the lower bound should be 1 and the upper bound 10 for 10 items, not [0:9]. | |
| 5DECLARE Marks : ARRAY[0:9] OF INTEGER | EThe data type is missing. An array declaration must say OF and give one type, such as OF INTEGER, for all the items. | |
| 6DECLARE Marks : ARRAY[1:10] | FDECLARE Prices : ARRAY[1:8] OF REAL |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
DECLARE Marks : ARRAY[1:10] OF INTEGER — Creates an array called Marks: a named list of 10 items, numbered from lower bound 1 to upper bound 10. Every item must be the same data type, here INTEGER.DECLARE Marks : ARRAY[1:10] OF INTEGERDECLARE Marks : ARRAY[1:10] OF INTEGERDECLARE Marks : ARRAY[1:10] OF INTEGERDECLARE Marks : ARRAY[1:10] OF INTEGERDECLARE Names : ARRAY[1:30] OF STRING