Computer Science For First Examination In 2021 9618 · 10

10.2 Arrays

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

Reset
2025 October-November · Paper 21 · Q3(a)(ii)

Arrays · 2 marks · official answer ready

(ii) A 1D array Rental containing 500 elements is used to store the data for all rental records. Write pseudocode to declare the Rental array. ....................................…

2025 October-November · Paper 41 · Q1(f)(i)

Arrays · 1 mark · official answer ready

(i) Extend the main program to call FindValues() Save your program. Copy and paste the program code into part 1(f)(i) in the evidence document. [1]

2025 October-November · Paper 41 · Q1(f)(ii)

Arrays · 1 mark · official answer ready

(ii) Test your program. Take a screenshot of the output(s). Save your program. Copy and paste the screenshot(s) into part 1(f)(ii) in the evidence document. [1] 4

2025 October-November · Paper 42 · Q2(a)

Arrays · 3 marks · official answer ready

(a) Write program code to declare the array local to the main program and store 20 unique random numbers between 0 and 100 (inclusive) in the array. Save your program as Question2…

2025 October-November · Paper 42 · Q3(a)

Arrays · 3 marks · official answer ready

(a) The binary tree is stored as a global array with the identifier TreeArray. The left pointer, the data and the right pointer of each node are initialised to –1 The global varia…

2025 October-November · Paper 43 · Q2(a)

Arrays · 2 marks · official answer ready

2 A program reads string data from a text file into a linear queue and then compresses the data. The queue is created using the global 1D array Queue. The queue can store up to 10…

2025 October-November · Paper 43 · Q3(a)(ii)

Arrays · 3 marks · official answer ready

3 A program is written to perform different individual processes using arrays. (a) A 1D array stores 10 integers. (ii) The main program stores the following data in a 1D array of …

2025 October-November · Paper 43 · Q3(a)(iii)

Arrays · 1 mark · official answer ready

3 A program is written to perform different individual processes using arrays. (a) A 1D array stores 10 integers. (iii) Test your program. Take a screenshot of the output(s). Save…

2025 October-November · Paper 43 · Q3(b)(ii)

Arrays · 6 marks · official answer ready

3 A program is written to perform different individual processes using arrays. (b) The program stores the following string. The string has four statements that are each terminated…

2025 October-November · Paper 43 · Q3(b)(iii)

Arrays · 2 marks · official answer ready

3 A program is written to perform different individual processes using arrays. (b) The program stores the following string. The string has four statements that are each terminated…

2025 May-June · Paper 23 · Q2(b)(i)

Arrays · 0 marks · official answer ready

(i) The array is represented in the diagram. A pointer value of –1 indicates the end of the linked list. Complete the pointer field to produce a linked list that is in alphabetica…

2025 May-June · Paper 33 · Q12(b)

Arrays · 4 marks · official answer ready

(b) A 1D array DataArray holds up to 1000 elements of type integer and needs to be sorted in ascending order. Write the pseudocode for an insertion sort to sort the array into asc…

2025 May-June · Paper 41 · Q2(b)

Arrays · 6 marks · official answer ready

(b) The procedure SplitData() takes a 1D string array as a parameter with the identifier DataArray The procedure declares six 1D arrays: one array for each colour that appears in …

2025 May-June · Paper 41 · Q2(d)

Arrays · 2 marks · official answer ready

(d) Each of the six colours has a blank text file where the numbers will be stored. The names of these six text files are: • Blue.txt • Green.txt • Orange.txt • Pink.txt • Red.txt…

2025 May-June · Paper 42 · Q2(b)(i)

Arrays · 12 marks · official answer ready

(i) Write program code to declare the global arrays HashTable and Spare Save your program. Copy and paste the program code into part 2(b)(i) in the evidence document. [1]

2025 May-June · Paper 42 · Q2(f)(ii)

Arrays · 12 marks · official answer ready

(ii) The main program should call the procedure to initialise the arrays, call the procedure to create the hash table and then call the procedure to output the contents of the arr…

2025 May-June · Paper 43 · Q1(e)(ii)

Arrays · 1 mark · official answer ready

(ii) Test your program. Take a screenshot of the output(s). Save your program. Copy and paste the screenshot into part 1(e)(ii) in the evidence document. [1] 4

2024 October-November · Paper 22 · Q1(d)

Arrays · 3 marks · official answer ready

(d) The new module referred to in part (c) introduces three new variables. Complete the following table by giving the appropriate data type for each. Variable name Used to store D…

2024 October-November · Paper 22 · Q6(a)

Arrays · 7 marks · official answer ready

(a) Complete the pseudocode for the procedure Special(). Assume that both arrays are global. PROCEDURE Special() ..................................................................…

2024 October-November · Paper 23 · Q4

Arrays · 0 marks

4 An examination paper has a maximum of 75 marks. One of five pass grades (A to E) is assigned, depending on the mark obtained. The lowest mark for a given grade is known as the g…