Computer Science 9608 · 10

Data types and structures

283 questions. Open a question to solve it and check the official answer.

2017 May-June · Paper 32 · Q4(b)(ii)

Files · 3 marks · official answer ready

(ii) File B organisation ............................................................................................................ Justification ...............................…

2017 May-June · Paper 32 · Q4(b)(iii)

Files · 3 marks · official answer ready

(iii) File C organisation ............................................................................................................ Justification ..............................…

2017 May-June · Paper 33 · Q1(a)(i)

Data types and records · 1 mark · official answer ready

(i) Write a pseudocode statement to declare a variable, Book, of type LibraryBookRecord. ..........................................................................................…

2017 May-June · Paper 33 · Q1(a)(ii)

Data types and records · 1 mark · official answer ready

(ii) Write a pseudocode statement that assigns ‘Dune’ to the Title of Book. .......................................................................................................…

2017 May-June · Paper 41 · Q2(a)

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…

2017 May-June · Paper 42 · Q2(a)

Introduction to abstract data types · 1 mark

(a) A null pointer is shown as O. Explain the meaning of the term null pointer. ...................................................................................................…

2017 May-June · Paper 42 · Q2(b)

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…

2017 May-June · Paper 42 · Q2(c)(i)

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]…

2017 May-June · Paper 42 · Q2(c)(ii)

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. ......................................................................…

2017 May-June · Paper 42 · Q2(d)(i)

Arrays · 7 marks · official answer ready

(i) Complete the pseudocode to create an empty tree. TYPE Node ....................................................................................................................…

2017 May-June · Paper 42 · Q2(d)(ii)

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 ..................…

2017 May-June · Paper 43 · Q2(a)

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…

2016 October-November · Paper 11 · Q2(c)

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. ....…

2016 October-November · Paper 12 · Q8(b)(i)

Files · 4 marks · official answer ready

(i) Describe two benefits of using DLL files. 1 ...................................................................................................................................…

2016 October-November · Paper 12 · Q8(b)(ii)

Files · 2 marks · official answer ready

(ii) State one drawback of using DLL files. .......................................................................................................................................…

2016 October-November · Paper 13 · Q2(c)

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. ....…

2016 October-November · Paper 21 · Q19(d)

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…

2016 October-November · Paper 21 · Q19(d)(ii)

Arrays · 18 marks

(ii) State two things that built-in and user-defined functions have in common. 1 ..................................................................................................…

2016 October-November · Paper 21 · Q19(e)(v)

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…

2016 October-November · Paper 22 · Q2(a)(iii)

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…