Data types and structures
223 questions. Open a question to solve it and check the official answer.
Data types and records · 1 mark
(i) Write the pseudocode statement to set up a variable for one record of the composite data type, Car. ...........................................................................…
Data types and records · 2 marks · official answer ready
(ii) Write the pseudocode statements to assign the following values to the variable set up in part (a)(i): • "Blue" to Colour • 21/10/2025 to IntoStock ...........................…
Data types and records · 2 marks · official answer ready
(i) Write the pseudocode statement for the type declaration of Body to hold the names of the available choices: Convertible, Hatchback, Saloon, SUV ...............................…
Data types and records · 1 mark · official answer ready
(ii) Write the new pseudocode statement required to update the declaration of BodyStyle in the definition of Car. .................................................................…
Files · 4 marks · official answer ready
(b) Describe how files are shared using the BitTorrent protocol. ..................................................................................................................…
Data types and records · 4 marks · official answer ready
(b) ColourData is a composite data type to store definitions of colours. Write pseudocode statements to declare ColourData to hold the following fields: Field Example data ColourC…
Data types and records · 3 marks · official answer ready
(a) Write pseudocode to declare the variables, constant and array required to implement the stack. ................................................................................…
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]
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
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…
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…
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…
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 …
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…
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…
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…
Introduction to abstract data types · 0 marks · official answer ready
(i) Complete the answer column in the following table: Answer the memory location of the value that has been on the stack for the longest time the number of consecutive push opera…
Introduction to abstract data types · 3 marks · official answer ready
(ii) The diagram shows the current state of the stack. Stack Memory Value location 409 408 407 'A' TopOfStack 406 'C' 405 'F' 404 'K' 403 'B' 402 'S' 401 'R' 400 'D' The following…
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…
Data types and records · 1 mark · official answer ready
(a) Explain one difference between functions and procedures. ......................................................................................................................…
