Data types and structures
283 questions. Open a question to solve it and check the official answer.
Files · 3 marks · official answer ready
(ii) File B organisation ............................................................................................................ Justification ...............................…
Files · 3 marks · official answer ready
(iii) File C organisation ............................................................................................................ Justification ..............................…
Data types and records · 1 mark · official answer ready
(i) Write a pseudocode statement to declare a variable, Book, of type LibraryBookRecord. ..........................................................................................…
Data types and records · 1 mark · official answer ready
(ii) Write a pseudocode statement that assigns ‘Dune’ to the Title of Book. .......................................................................................................…
Data types and records · 4 marks · official answer ready
(a) The following pseudocode declares a customer record structure. TYPE CustomerRecord CustomerID : INTEGER Data : STRING ENDTYPE The hash table is to be implemented as a 1D array…
Introduction to abstract data types · 1 mark
(a) A null pointer is shown as O. Explain the meaning of the term null pointer. ...................................................................................................…
Introduction to abstract data types · 2 marks · official answer ready
(b) The following diagram shows an ordered binary tree after the following data have been added: Dublin, London, Berlin, Paris, Madrid, Copenhagen RootPointer Dublin Ø Berlin Ø Lo…
Introduction to abstract data types · 50 marks · official answer ready
(i) Add the relevant pointer values to complete the diagram. RootPointer LeftPointer Tree data RightPointer 0 [0] Dublin [1] London [2] Berlin [3] Paris [4] Madrid FreePointer [5]…
Introduction to abstract data types · 2 marks · official answer ready
(ii) Give an appropriate numerical value to represent the null pointer for this design. Justify your answer. ......................................................................…
Arrays · 7 marks · official answer ready
(i) Complete the pseudocode to create an empty tree. TYPE Node ....................................................................................................................…
Data types and records · 8 marks · official answer ready
(ii) Complete the pseudocode to add a data item to the tree. PROCEDURE AddToTree(BYVALUE NewDataItem : STRING) // if no free node report an error IF FreePointer ..................…
Data types and records · 4 marks · official answer ready
(a) The following pseudocode declares a customer record structure. TYPE CustomerRecord CustomerID : INTEGER Data : STRING ENDTYPE The hash table is to be implemented as a 1D array…
Files · 2 marks · official answer ready
(c) New program code is to be written in a high-level language. The use of Dynamic Link Library (DLL) files is considered in the design. Describe what is meant by a DLL file. ....…
Files · 4 marks · official answer ready
(i) Describe two benefits of using DLL files. 1 ...................................................................................................................................…
Files · 2 marks · official answer ready
(ii) State one drawback of using DLL files. .......................................................................................................................................…
Files · 2 marks · official answer ready
(c) New program code is to be written in a high-level language. The use of Dynamic Link Library (DLL) files is considered in the design. Describe what is meant by a DLL file. ....…
Arrays · 4 marks
19 ENDWHILE 7 (d) To code the ‘Search by product code’ procedure, Ahmed draws a structure chart showing the different stages. The procedure uses the variables shown in the identif…
Arrays · 18 marks
(ii) State two things that built-in and user-defined functions have in common. 1 ..................................................................................................…
Data types and records · 7 marks
(v) Answer2 ................................... [1] 19 Appendix Built-in functions (pseudocode) ONECHAR(ThisString : STRING, Position : INTEGER) RETURNS CHAR returns the single ch…
Data types and records · 1 mark · official answer ready
(iii) Temp1 "13" Temp2 ONECHAR("One-2-One", 5) z TONUM(Temp2 & Temp1) z ............................ [1] A computer program is to simulate the reading and processing of a string o…
