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 NoughtsAndCrosses : ARRAY[1:3, 1:3] OF CHAR | ADeclares a 2D array with 3 rows and 3 columns, where every element stores one CHAR | |
| 2DECLARE Marks : ARRAY[0:4, 0:2] OF INTEGER | BThe keyword OF is missing before the data type. It should be ARRAY[1:4, 1:3] OF CHAR. | |
| 3The two ranges for the two dimensions are separated by a comma inside the square brackets | CDECLARE Board : ARRAY[1:3, 1:3] OF CHAR | |
| 4Every element in a 2D array shares one data type, written after OF | DThe two ranges are written in separate square brackets. They must be in one pair of brackets separated by a comma: ARRAY[1:3, 1:3]. | |
| 5DECLARE Grid : ARRAY[1:3][1:3] OF CHAR | EDeclares a 2D array with indexes 0 to 4 in the first dimension and 0 to 2 in the second, storing INTEGER values | |
| 6DECLARE Scores : ARRAY[1:4, 1:3] CHAR | FDECLARE Seats : ARRAY[1:5, 1:8] OF BOOLEAN |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
DECLARE Grid : ARRAY[1:3, 1:3] OF CHAR — Declares a 2D array called Grid. The first range is the rows, the second is the columns, split by a comma. All elements share one data type, here CHAR.DECLARE Board : ARRAY[1:3, 1:3] OF CHARDECLARE Board : ARRAY[1:3, 1:3] OF CHARDECLARE Grid : ARRAY[1:3, 1:3] OF CHARDECLARE Board : ARRAY[1:3, 1:3] OF CHARDECLARE Table : ARRAY[0:2, 0:3] OF INTEGER