Computer Science 2210 · 8

8.2 Arrays

32 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2025 October-November · Paper 22 · Q5(c)

Arrays · 4 marks · official answer ready

(c) The algorithm on page 6 requires the array CodeStore[] to be declared as a one‑dimensional (1D) string array with six elements that are initially set to the null string "". Wr…

2025 October-November · Paper 22 · Q8

Arrays · 15 marks · official answer ready

8 A program is required to test the fairness of the random number generator. The one‑dimensional (1D) array RandomNumber[] is used to store 100 000 random integers. The two‑dimens…

2025 October-November · Paper 23 · Q10

Arrays · 15 marks · official answer ready

10 A number game has two players. Random whole numbers are generated for each player. The numbers are compared and players are given points based on the result of the comparison. …

2025 May-June · Paper 21 · Q3

Arrays · 4 marks · official answer ready

3 The following pseudocode algorithm uses a count-controlled loop to read in 10 names and store them in the array Names[] FOR Count 1 TO 10 OUTPUT "Please enter a name" INPUT Name…

2025 May-June · Paper 21 · Q11

Arrays · 15 marks · official answer ready

11 The one-dimensional (1D) array CompetitorName[] contains the names of 25 competitors in a tournament that includes five events. Another two-dimensional (2D) array CompetitorSco…

2025 May-June · Paper 22 · Q5(b)

Arrays · 2 marks · official answer ready

(b) Write the pseudocode statement that will output the average height rounded to one decimal place. ..............................................................................…

2024 May-June · Paper 21 · Q10

Arrays · 15 marks · official answer ready

10 The one-dimensional (1D) array Clubs[] is used to store the names of 12 cricket clubs in a local sports league. The two-dimensional (2D) array Statistics[] is used to store, fo…

2024 May-June · Paper 22 · Q7(a)

Arrays · 5 marks · official answer ready

(a) Give a line number for each of these types of statement: Assignment statement .................................................................................................…

2024 May-June · Paper 22 · Q11

Arrays · 15 marks · official answer ready

11 A one-player game uses the two-dimensional (2D) array Grid[] to store the location of a secret cell to be found by the player in 10 moves. Each row and column has 5 cells. Star…

2023 October-November · Paper 22 · Q3(b)

Arrays · 4 marks · official answer ready

(b) A one‑dimensional (1D) array called Temperatures[] has 25 elements beginning at index 1. It holds values that range between –20 and 100 inclusive. Write a pseudocode algorithm…

2023 October-November · Paper 22 · Q11

Arrays · 15 marks · official answer ready

11 A wood flooring company stores the names of up to 100 customers in a one‑dimensional (1D) array Customers[]. A two‑dimensional (2D) array Quotations[] stores details of each cu…

2023 October-November · Paper 23 · Q10

Arrays · 15 marks · official answer ready

10 A weather station takes temperature readings once an hour for a week. These temperatures are stored in a two-dimensional (2D) array Temperatures[] Each column contains 24 readi…

2023 May-June · Paper 21 · Q11

Arrays · 15 marks · official answer ready

11 A one-dimensional (1D) array Days[] contains the names of the days of the week. A two-dimensional (2D) array Readings[] is used to store 24 temperature readings, taken once an …

2023 May-June · Paper 21 · Q13(c)

Arrays · 23 marks

(c) Describe one problem that could occur with this algorithm if an invalid character was input. ..................................................................................…

2022 October-November · Paper 22 · Q5(b)

Arrays · 4 marks · official answer ready

(b) The corrected algorithm needs to be changed so that any number of marks may be entered and the algorithm runs until the user tells it to stop. Write the new pseudocode stateme…

2022 May-June · Paper 21 · Q4(b)

Arrays · 4 marks · official answer ready

(b) Write a pseudocode routine that will check that each test result entered into the algorithm is between 0 and 100 inclusive. ...................................................…

2022 May-June · Paper 22 · Q3(a)

Arrays · 3 marks · official answer ready

3 (a) Describe a one-dimensional array. Include an example of an array declaration. ...............................................................................................…

2022 May-June · Paper 22 · Q3(b)

Arrays · 2 marks · official answer ready

(b) Explain how indexing could be used to search for a value stored in a one-dimensional array. ...................................................................................…

2021 October-November · Paper 22 · Q1(a)(ii)

Arrays · 5 marks · official answer ready

(ii) Describe the arrays you could have used in Task 1. Include the name, data type, use and sample data for each array. ..........................................................…

2021 May-June · Paper 22 · Q5(a)

Arrays · 3 marks · official answer ready

(a) Write a pseudocode routine that sets each element to zero. Use the most suitable loop structure. ..............................................................................…