Computer Science 9608 · 10

Data types and structures

283 questions. Open a question to solve it and check the official answer.

2021 May-June · Paper 41 · Q2(a)

Data types and records · 3 marks · official answer ready

(a) Write pseudocode to define the record type customer. ..........................................................................................................................…

2021 May-June · Paper 41 · Q4(b)(i)

Arrays · 4 marks · official answer ready

(i) The table shows the contents of the three fields in each record stored in the 1D array binaryTree. Complete the table to show the contents of binaryTree from part (a). rootPoi…

2021 May-June · Paper 41 · Q4(b)(ii)

Data types and records · 2 marks · official answer ready

(ii) Write pseudocode to declare the array binaryTree to store up to 100 objects of type node. ....................................................................................…

2021 May-June · Paper 42 · Q2(a)

Data types and records · 2 marks · official answer ready

(a) Write the pseudocode record declaration for the data type Booking. ............................................................................................................…

2021 May-June · Paper 43 · Q2(a)

Data types and records · 3 marks · official answer ready

(a) Write pseudocode to define the record type customer. ..........................................................................................................................…

2021 May-June · Paper 43 · Q4(b)(i)

Arrays · 4 marks · official answer ready

(i) The table shows the contents of the three fields in each record stored in the 1D array binaryTree. Complete the table to show the contents of binaryTree from part (a). rootPoi…

2021 May-June · Paper 43 · Q4(b)(ii)

Data types and records · 2 marks · official answer ready

(ii) Write pseudocode to declare the array binaryTree to store up to 100 objects of type node. ....................................................................................…

2019 October-November · Paper 11 · Q4(a)(ii)

Files · 2 marks · official answer ready

(ii) Give two other examples of applications that can use the client-server model. 1 ..............................................................................................…

2019 October-November · Paper 21 · Q1(b)(i)

Data types and records · 4 marks · official answer ready

(i) Programming languages support different data types. Complete the table by giving a suitable data type for each example value. Example value Data type "NOT TRUE" − 4.5 NOT FALS…

2019 October-November · Paper 21 · Q3

Data types and records · 7 marks · official answer ready

3 The following is a function design in pseudocode. Line numbers are given for reference only. 10 FUNCTION Check(InString : STRING) RETURNS BOOLEAN 11 12 DECLARE NumDots : INTEGER…

2019 October-November · Paper 21 · Q5(b)(ii)

Data types and records · 2 marks · official answer ready

(ii) State the value returned when the function is called using the expression shown. Justify your answer. Value ..................................................................…

2019 October-November · Paper 21 · Q6(a)

Files · 1 mark · official answer ready

(a) State one reason for storing data in a file rather than in an array. ..........................................................................................................…

2019 October-November · Paper 21 · Q6(c)

Files · 8 marks · official answer ready

(c) Write pseudocode for the module FindDuplicates(). The module description is given in the table on page 12. ....................................................................…

2019 October-November · Paper 21 · Q6(d)(i)

Files · 3 marks · official answer ready

(i) Write pseudocode for the modified ClearArray() procedure. .....................................................................................................................…

2019 October-November · Paper 21 · Q6(d)(ii)

Data types and records · 2 marks · official answer ready

(ii) Write program code for a statement that calls the modified ClearArray() procedure to clear the array Duplicates to "Empty". Programming language .............................…

2019 October-November · Paper 22 · Q3(a)

Data types and records · 3 marks · official answer ready

(a) The array Result is a 1D array of type INTEGER. Write pseudocode to declare the array and to initialise all elements to zero. .................................................…

2019 October-November · Paper 22 · Q5

Data types and records · 7 marks · official answer ready

5 The module headers for three modules in a program are defined in pseudocode as follows: Pseudocode module header PROCEDURE Lookup(P4 : INTEGER, BYREF M4 : STRING) FUNCTION Updat…

2019 October-November · Paper 22 · Q6(c)

Data types and records · 3 marks · official answer ready

(c) CountTimes() is to be used to count how many unused elements there are in the Leavers array. An unused element is one that contains an empty string. The module description is …

2019 October-November · Paper 23 · Q4(b)(ii)

Data types and records · 1 mark · official answer ready

(ii) State the value returned when function Check is called as shown in part (b)(i). ..............................................................................................…

2019 October-November · Paper 23 · Q4(c)

Data types and records · 4 marks · official answer ready

(c) The function Check() is to be tested. State two different invalid string values that could be used to test the algorithm. Each string should test a different rule. Justify you…