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:25] OF INTEGER | ADeclares a 1D array called Temps with indexes 0 to 6, so it has 7 elements, each holding a REAL number | |
| 2DECLARE Temps : ARRAY[0:6] OF REAL | BRound brackets are used instead of square brackets. The bounds must be written as [1:30]. | |
| 3The bounds go inside square brackets with the lower bound first, then a colon, then the upper bound | CDeclares a 1D array called Marks with indexes 1 to 25, so it has 25 elements, each holding an INTEGER | |
| 4The declaration only sets up the array and its data type; it does not store any values, so a separate assignment is needed to fill an element | DThe word OF is missing before the data type. It should be ARRAY[1:20] OF INTEGER. | |
| 5DECLARE Names : ARRAY(1:30) OF STRING | EDECLARE Scores : ARRAY[1:10] OF INTEGER Scores[1] ← 15 | |
| 6DECLARE Marks : ARRAY[1:20] INTEGER | FDECLARE Names : ARRAY[1:30] OF STRING |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
DECLARE StudentNames : ARRAY[1:30] OF STRING — Declares a 1D array named StudentNames with indexes 1 to 30 (lower:upper), each element holding a STRING. It only sets up the array; no values are stored yet.DECLARE StudentNames : ARRAY[1:30] OF STRINGDECLARE Scores : ARRAY[1:10] OF INTEGERDECLARE Marks : ARRAY[1:20] OF INTEGERDECLARE Temperatures : ARRAY[0:6] OF REAL// one element for each month
DECLARE Rainfall : ARRAY[1:12] OF REAL