Computer Science 0478 · 8

8.2 Arrays

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

Reset
2025 October-November · Paper 21 · Q11

Arrays · 15 marks · official answer ready

11 The scores for each competitor in an archery competition are recorded. The one-dimensional (1D) array CompetitorName[] is used to store the names of the competitors. The maximu…

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. ..............................................................................…

2025 May-June · Paper 23 · Q8

Arrays · 15 marks · official answer ready

8 A collector needs a video library system for a collection of videos stored on 4K Blu-ray discs, standard Blu-ray discs, DVD, or as digital downloads. The two-dimensional (2D) ar…

2025 February-March · Paper 22 · Q6(b)

Arrays · 2 marks · official answer ready

(b) Write the pseudocode statement to output the average of the numbers, rounded to two decimal places. ...........................................................................…

2025 February-March · Paper 22 · Q10

Arrays · 15 marks · official answer ready

10 A sports club uses a six-character alphanumeric membership code to identify each member of the club. The one-dimensional (1D) array MemberID[] is used to store the unique membe…

2024 October-November · Paper 21 · Q6(b)

Arrays · 3 marks · official answer ready

(b) Write the pseudocode to display, with suitable messages, the number of zeros stored in the array and the total of the non-zero values. ........................................…

2024 October-November · Paper 21 · Q19(d)(ii)

Arrays · 17 marks

(ii) Explain how one of the lines in your statement in part (d)(i) could be changed to display the same information. ..............................................................…

2024 October-November · Paper 22 · Q12

Arrays · 15 marks · official answer ready

12 A one-dimensional (1D) array Rooms[] contains the names of up to 20 rooms in a house. A two-dimensional (2D) array Dimensions[] is used to store the length, width and area of e…

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…

2024 May-June · Paper 23 · Q4(b)

Arrays · 4 marks · official answer ready

(b) Write the pseudocode that you could add to the end of this algorithm to output the contents of the array. Make sure that the output ends when the data in the array ends. .....…

2024 May-June · Paper 23 · Q9

Arrays · 15 marks · official answer ready

9 A one-dimensional (1D) array Teams[] contains the names of 10 football teams in a local league. A two-dimensional (2D) array Results[] stores, for each team, the total number of…

2024 February-March · Paper 22 · Q11

Arrays · 15 marks · official answer ready

11 Students in a class are recording the amount of time in minutes spent in front of a screen for each day of the week. The one-dimensional (1D) array StudentName[] contains the n…

2023 October-November · Paper 21 · Q10

Arrays · 15 marks · official answer ready

10 Drama students put on a performance of a play for one evening. Seats in a small theatre can be booked for this performance. The theatre has 10 rows of 20 seats. The status of t…