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 | |
|---|---|---|
| 1NoughtsAndCrosses[2,3] ← 'X' | ANoughtsAndCrosses[1,1] ← 'O' | |
| 2NoughtsAndCrosses[3,2] ← 'O' | BStores the CHAR 'O' in row 3, column 2, a different element from row 2, column 3 | |
| 3Write a CHAR value into the element in row 1, column 1 of a 2D array (the CHAR goes in single quotes) | CGrid[3,1] ← 'X' | |
| 4Write a value into one element, giving the row index first and then the column index | DStores the CHAR 'X' in the element in row 2, column 3 of the 2D array | |
| 5NoughtsAndCrosses[2] ← 'X' | EA 2D array needs two index values, a row and a column. Only one index is given, so no single element is identified. | |
| 6NoughtsAndCrosses[1,2] ← "X" | FThe CHAR value is in double quotes. A CHAR must be written in single quotes, and double quotes are for STRING values. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Name[row, column] ← value — Stores a value in one element of a 2D array. Give the row index first, then the column index, e.g. NoughtsAndCrosses[2,3] ← 'X' puts a CHAR in row 2, column 3.NoughtsAndCrosses[2,3] ← 'X'NoughtsAndCrosses[2,3] ← 'X'NoughtsAndCrosses[1,1] ← 'O'NoughtsAndCrosses[2,3] ← 'X'
// Put an O in row 3, column 2
NoughtsAndCrosses[3,2] ← 'O'NoughtsAndCrosses[1,1] ← 'O'