Data types and structures
223 questions. Open a question to solve it and check the official answer.
Data types and records · 2 marks · official answer ready
(b) Module SendFile() is used to copy a file from one computer to another. A module within the program running on the destination computer will receive the data and write it to a …
Files · 2 marks · official answer ready
(i) Explain why this is a problem. ........................................................................................................................................... ....…
Files · 2 marks · official answer ready
(ii) Explain how the message format could be changed to allow a blank line to be sent. ............................................................................................…
Data types and records · 4 marks · official answer ready
(a) The following identifier table shows some of the data that will be stored for each order. Complete the identifier table by adding meaningful variable names and appropriate dat…
Arrays · 0 marks · official answer ready
(a) The linked list is implemented using two variables and two 1D arrays as shown. The pointer variables and the elements of the Pointer array store the indices (index numbers) of…
Data types and records · 9 marks · official answer ready
8 [5] 7 (b) The original linked list is to be modified. A new node D6 is inserted between nodes D32 and D11. Ptr1 D40 D32 D11 D100 Ø Ptr2 F1 F2 F3 F4 Ø The algorithm required is e…
Data types and records · 62 marks
(iii) State the file mode that should be used in CheckFiles(). ....................................................................................................................…
Introduction to abstract data types · 10 marks · official answer ready
(ii) Suggest a more appropriate Abstract Data Type that could be used to store the messages that would not have the same problem. .................................................…
Arrays · 0 marks · official answer ready
(a) Complete the diagram to represent the state of the queue as shown above. Index Array 1 2 3
Files · 15 marks · official answer ready
(a) Write pseudocode for procedure RandList(). ....................................................................................................................................…
Data types and records · 49 marks
(i) Write pseudocode to define MyType. ........................................................................................................................................... …
Data types and records · 8 marks
8 (a) A pseudocode algorithm finds a customer account record in a random file and outputs it. The records are stored using the user-defined data type TAccount. TYPE TAccount DECLA…
Data types and records · 5 marks · official answer ready
8 (a) A pseudocode algorithm finds a customer account record in a random file and outputs it. The records are stored using the user-defined data type TAccount. TYPE TAccount DECLA…
Introduction to abstract data types · 10 marks
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Data types and records · 3 marks · official answer ready
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Introduction to abstract data types · 2 marks · official answer ready
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Introduction to abstract data types · 2 marks · official answer ready
(i) Study the pseudocode in part (a)(ii) and complete the table of identifiers by writing the missing data types and descriptions. Identifier Data type Description BasePointer Top…
Data types and records · 5 marks · official answer ready
(ii) Complete the pseudocode. CONSTANT MaxSize = 40 DECLARE BasePointer : INTEGER DECLARE TopPointer : INTEGER DECLARE Stack : ARRAY[1:40] OF REAL // initialisation of stack PROCE…
Introduction to abstract data types · 2 marks · official answer ready
(b) Justify the use of a linked list instead of an array to implement a stack. ....................................................................................................…
Data types and records · 7 marks
19 dislikes(toby, caving). These clauses have the meanings: Clause Meaning 01 Music is a hobby 07 Toby is a person 13 Natasha enjoys travelling 19 Toby dislikes caving (b) A pseud…
