Question 6(f)(i) 2016 · May-June · Paper 31 · 16 marks
Question 6
Part (f)
(i)
Question 6
<sentence> ::= <verbPhrase> | <sentence><nounPhrase>
Write the binary patterns for the largest and smallest positive number that can be represented with this 16-bit format for normalised real numbers.
Smallest
Largest
Question 12
5 A company stores customer data in a database using linked lists.
An array of records of data type CustomerNode implements a linked list of surnames.
The linked list stores the surnames in alphabetical order.
The CustomerNode record has two fields as defined below:
TYPE CustomerNode Surname : STRING Pointer : INTEGER ENDTYPE
The linked list is created using the array and variable shown below.
Identifier Data type Description
SurnameList ARRAY[1 : 10000] OF CustomerNode An array to store the surname and pointer values
HeadSurname INTEGER Stores the index position of the node at the head of the linked list
Part (a)
(i)
Explain the difference between a static data structure and a dynamic data structure.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
......................................................................................................................................
(ii)
State a benefit gained from using a dynamic data structure to implement a linked list.
...........................................................................................................................................
......................................................................................................................................
Question 13
The database initially contains the records of four customers. These have the surnames:
GREENE, HASAN, ALI and ABBOT.
The data are stored as shown below:
+HDG6XUQDPH
6XUQDPH/LVW 6XUQDPH 3RLQWHU 1 *5((1(
2 +$6$1
3 $/,
4 $%%27
: :
9999
100000
Part (b)
State the value of:
SurnameList[HeadSurname].Surname ...............................................................
SurnameList[3].Pointer ............................................................................
Part (c)
Complete the linked list diagram by adding the data and pointer values for each customer
node.
+HDG6XUQDPH
Question 14
Part (d)
A similar linked list is maintained by the database management software to organise
customers according to the money owed to the company (the balance). The data structure used is a second linked list. The pointer to the head of this linked list is HeadBalance.
+HDG%DODQFH 31
0 134
20 28
180 156
510 0
(i)
A new customer with an outstanding balance of $130 is to be inserted into the linked list.
On the diagram above, add the required data to the empty node. Adjust pointer(s) where necessary.
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Why this question appears here
99% assigned-topic match · Data types and structures › Data types and records
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s16_qp_31.pdf
