Data types and structures
223 questions. Open a question to solve it and check the official answer.
Data types and records · 3 marks · official answer ready
(c) Part of an identifier table is shown: Variable Type Example value FlagDay DATE 23/04/2004 CharList STRING "ABCDEF" Count INTEGER 29 Complete the table by evaluating each expre…
Introduction to abstract data types · 3 marks · official answer ready
(a) A stack is an example of an Abstract Data Type (ADT). Identify one other example of an ADT and describe its main features. Example ............................................…
Arrays · 6 marks · official answer ready
(a) Write efficient pseudocode for module OutputError(). ..........................................................................................................................…
Arrays · 1 mark · official answer ready
(i) State the error in the record declaration. ....................................................................................................................................…
Arrays · 2 marks · official answer ready
(ii) State two benefits of using the single array of the user-defined data type. 1 ................................................................................................…
Data types and records · 1 mark · official answer ready
(i) Write the pseudocode statement to set up a variable for one record of the composite data type Pet. ............................................................................…
Data types and records · 3 marks · official answer ready
(ii) Write pseudocode to store the details of the following pet, in the variable you set up in part (d)(i). PetName AnimalType PetAge PetGender OwnerName Tibbles Cat 8 M Jasmine S…
Data types and records · 3 marks · official answer ready
(i) Write program code to call ReadFile() and FindValues() from the main program. The return value from FindValues() must be output with an appropriate message. Save your program.…
Arrays · 2 marks · official answer ready
(b) The binary tree stores the following values: Index Left pointer Data Right pointer 0 1 20 5 1 2 15 –1 2 –1 3 3 3 –1 9 4 4 –1 10 –1 5 –1 58 –1 6 –1 –1 –1 FreeNode stores the in…
Data types and records · 4 marks · official answer ready
(b) Complete the following table by giving the appropriate data type in each case. Use of variable Data type The average mark in a class of 40 students An email address The number…
Introduction to abstract data types · 0 marks
3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…
Introduction to abstract data types · 2 marks · official answer ready
3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…
Introduction to abstract data types · 2 marks · official answer ready
3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…
Introduction to abstract data types · 1 mark · official answer ready
3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…
Arrays · 6 marks · official answer ready
(c) The following new module is introduced: Module Description • Called with a row number as an INTEGER • Uses SearchInRow() to find the first and last columns in the given row wh…
Introduction to abstract data types · 2 marks · official answer ready
(c) Identify two ADTs other than a stack. 1 .......................................................................................................................................…
Data types and records · 5 marks · official answer ready
(d) The function StackFull() checks whether a stack is full. The function uses the variable TopOfStack to represent the pointer to the most recent position used on the stack, and …
Arrays · 9 marks · official answer ready
(i) Edit the main program to perform the actions described. Save your program. Copy and paste the program code into part 3(d)(i) in the evidence document. [3]
Arrays · 6 marks · official answer ready
(ii) Test the program by entering the data: 10 5 15 8 12 6 20 11 9
Files · 4 marks · official answer ready
(a) Draw one line from each utility software to its correct description. Utility software Description Scans software for errors and repairs the problems Moves parts of files so th…
