Computer Science 9608 · 10

Data types and structures

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

2018 May-June · Paper 22 · Q6(b)

Data types and records · 8 marks · official answer ready

(b) A 2D array, Picture, contains data representing a bitmap image. Each element of the array represents one pixel of the image. The image is grey-scale encoded where the value of…

2018 May-June · Paper 23 · Q3(a)

Data types and records · 1 mark · official answer ready

(a) State the term given to values passed between modules. ........................................................................................................................…

2018 May-June · Paper 23 · Q6(a)

Arrays · 1 mark

6 (a) Individual elements in a 1D array are referenced using an integer variable. For example, using the variable n, an individual element would be referenced in pseudocode as: St…

2018 May-June · Paper 23 · Q7

Data types and records · 6 marks · official answer ready

7 A function, IsFactor() takes two integer parameters and checks whether the second parameter is a factor of the first parameter. For example IsFactor(6,3) would return TRUE as si…

2018 May-June · Paper 31 · Q2(b)

Data types and records · 4 marks · official answer ready

(b) Describe two different non-composite data types. Data type 1 ..................................................................................................................…

2018 May-June · Paper 31 · Q3(c)(ii)

Files · 3 marks · official answer ready

(ii) Peer-to-peer (P2P) file sharing uses the BitTorrent protocol. Explain how the BitTorrent protocol allows files to be shared. .................................................…

2018 May-June · Paper 32 · Q1(c)(i)

Data types and records · 4 marks · official answer ready

(i) Write pseudocode to define the data type StudentAssessment. ...................................................................................................................…

2018 May-June · Paper 32 · Q1(c)(ii)

Data types and records · 3 marks · official answer ready

(ii) Data about all students and their assessments are stored in a file that uses random organisation. The StudentID is used as the key field. The program allows a user to enter d…

2018 May-June · Paper 33 · Q2(b)

Data types and records · 4 marks · official answer ready

(b) Describe two different non-composite data types. Data type 1 ..................................................................................................................…

2018 May-June · Paper 33 · Q3(c)(ii)

Files · 3 marks · official answer ready

(ii) Peer-to-peer (P2P) file sharing uses the BitTorrent protocol. Explain how the BitTorrent protocol allows files to be shared. .................................................…

2018 May-June · Paper 41 · Q6(a)(i)

Data types and records · 3 marks · official answer ready

(i) Use pseudocode to write a definition for the record type, ListNode. ...........................................................................................................…

2018 May-June · Paper 41 · Q6(a)(ii)

Introduction to abstract data types · 2 marks · official answer ready

(ii) An array, Scorers, will hold 10 nodes of type ListNode. Use pseudocode to write an array declaration for this array. The lower bound subscript is 0. .........................…

2018 May-June · Paper 42 · Q3(b)

Arrays · 7 marks · official answer ready

(b) The following pseudocode algorithm performs an insertion sort on the CardData array. Complete the following pseudocode algorithm. 01 ArraySize ← 10 02 FOR Pointer ← 2 TO .....…

2018 May-June · Paper 42 · Q3(c)(ii)

Arrays · 4 marks · official answer ready

(ii) The current contents of CardData are shown. Explain how a binary search will find the value 25 in CardData. ..................................................................…

2018 May-June · Paper 42 · Q6(a)

Data types and records · 5 marks · official answer ready

(a) The following commands are executed. CreateTree("Red") AttachLeft("Blue", 0) AttachRight("Green", 0) The following diagram shows the current state of the binary tree. 0 "Red" …

2018 May-June · Paper 43 · Q6(a)(i)

Data types and records · 3 marks · official answer ready

(i) Use pseudocode to write a definition for the record type, ListNode. ...........................................................................................................…

2018 May-June · Paper 43 · Q6(a)(ii)

Introduction to abstract data types · 2 marks · official answer ready

(ii) An array, Scorers, will hold 10 nodes of type ListNode. Use pseudocode to write an array declaration for this array. The lower bound subscript is 0. .........................…

2017 October-November · Paper 13 · Q5(b)(ii)

Files · 2 marks · official answer ready

(ii) Describe two possible uses for this device on a home Personal Computer (PC). 1 ...............................................................................................…

2017 October-November · Paper 21 · Q1(a)(i)

Data types and records · 6 marks · official answer ready

(i) Procedural high-level languages usually support different data types. Give an appropriate data type for each data value in the following table. Data value Data type 27 "27" "2…

2017 October-November · Paper 21 · Q3(a)

Data types and records · 8 marks · official answer ready

3 (a) A multi-user computer system stores information about users. It uses a 1D array, UserNameArray, of type STRING. There are 100 elements in the array. The format of the string…