Computer Science 9608 · 10

Data types and structures

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

2019 May-June · Paper 21 · Q4(c)

Data types and records · 1 mark · official answer ready

(c) State the term used for changes that are made to a program in response to a specification change. .............................................................................…

2019 May-June · Paper 21 · Q6(b)

Data types and records · 8 marks · official answer ready

(b) The module, FindCD(), will check whether a given CD exists in the collection. The module will be implemented as a function. The function will: • be called with two strings as …

2019 May-June · Paper 22 · Q3(a)(ii)

Data types and records · 3 marks · official answer ready

(ii) Write the pseudocode header for module SubB(). ...............................................................................................................................…

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

Data types and records · 2 marks · official answer ready

(b) Module hierarchy and parameters are two features that may be represented on a structure chart. State two other features than can be represented. Feature 1 ....................…

2019 May-June · Paper 22 · Q4(a)(ii)

Data types and records · 1 mark

(ii) State the value returned by the function when it is called as shown in part (a)(i). ....................................... [1] 10

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

Files · 3 marks · official answer ready

(a) Use structured English to describe an algorithm she could use. ................................................................................................................…

2019 May-June · Paper 22 · Q6(c)

Data types and records · 3 marks · official answer ready

(c) Write pseudocode for the module declaration of WriteInfo(). ...................................................................................................................…

2019 May-June · Paper 23 · Q2(a)

Arrays · 5 marks · official answer ready

2 (a) A student is learning about arrays. She wants to write a program to: • search through a 1D array of 100 elements • count the number of elements that contain the string “Empt…

2019 May-June · Paper 23 · Q3(a)

Data types and records · 6 marks · official answer ready

(a) Draw a structure chart to show the four modules and the parameters that these pass between them. [6]

2019 May-June · Paper 23 · Q5(a)(ii)

Data types and records · 1 mark · official answer ready

(ii) Dry running the code is often used in white-box testing. In this method, the programmer records the values of variables as they change. Identify what the programmer would nor…

2019 May-June · Paper 23 · Q6(c)

Data types and records · 3 marks · official answer ready

(c) ProcessArray() is modified to make it general purpose. It will now be called with two parameters as follows: • an array • a string representing the name of a class contact fil…

2019 May-June · Paper 41 · Q1(b)

Introduction to abstract data types · 3 marks

(b) A queue is an alternative Abstract Data Type (ADT). Describe a queue. .........................................................................................................…

2019 May-June · Paper 41 · Q2(a)(ii)

Arrays · 6 marks

(ii) The following diagram shows a 2D array that stores the nodes of the binary tree’s linked list. Add the correct pointer values to complete the diagram, using your answer from …

2019 May-June · Paper 42 · Q1(a)(ii)

Arrays · 6 marks · official answer ready

(ii) The following diagram shows a 2D array that stores the nodes of the binary tree’s linked list. Add the correct pointer values to complete the diagram, using your answer from …

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

Introduction to abstract data types · 1 mark · official answer ready

(a) Tick (3) one box to show the statement that describes a stack data structure. Statement Tick (3) Last in first out First in first out Last in last out [1]

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

Introduction to abstract data types · 1 mark · official answer ready

(i) Show the contents of the stack in part (b) after the following operations. POP() POP() PUSH(10) [1] 13

2019 May-June · Paper 42 · Q2(b)(ii)

Introduction to abstract data types · 1 mark · official answer ready

(ii) Show the contents of the stack from part (b)(i) after these further operations: POP() PUSH(50) PUSH(55) POP() PUSH(65) [1] 14

2019 May-June · Paper 43 · Q1(b)

Introduction to abstract data types · 3 marks

(b) A queue is an alternative Abstract Data Type (ADT). Describe a queue. .........................................................................................................…

2019 May-June · Paper 43 · Q2(a)(ii)

Arrays · 6 marks

(ii) The following diagram shows a 2D array that stores the nodes of the binary tree’s linked list. Add the correct pointer values to complete the diagram, using your answer from …

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

Data types and records · 5 marks · official answer ready

(i) The following table contains statements written in pseudocode. Give the most appropriate data type for the variable used in each statement. Statement Data type MyAverage 13.5 …