Data types and structures
283 questions. Open a question to solve it and check the official answer.
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. .............................................................................…
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 …
Data types and records · 3 marks · official answer ready
(ii) Write the pseudocode header for module SubB(). ...............................................................................................................................…
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 ....................…
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
Files · 3 marks · official answer ready
(a) Use structured English to describe an algorithm she could use. ................................................................................................................…
Data types and records · 3 marks · official answer ready
(c) Write pseudocode for the module declaration of WriteInfo(). ...................................................................................................................…
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…
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]
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…
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…
Introduction to abstract data types · 3 marks
(b) A queue is an alternative Abstract Data Type (ADT). Describe a queue. .........................................................................................................…
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 …
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 …
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]
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
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
Introduction to abstract data types · 3 marks
(b) A queue is an alternative Abstract Data Type (ADT). Describe a queue. .........................................................................................................…
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 …
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 …
