Computer Science For First Examination In 2021 9618 · 10

Data types and structures

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

2022 October-November · Paper 22 · Q1(c)

Data types and records · 3 marks · official answer ready

(c) Part of an identifier table is shown: Variable Type Example value FlagDay DATE 23/04/2004 CharList STRING "ABCDEF" Count INTEGER 29 Complete the table by evaluating each expre…

2022 October-November · Paper 22 · Q3(a)

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

(a) A stack is an example of an Abstract Data Type (ADT). Identify one other example of an ADT and describe its main features. Example ............................................…

2022 October-November · Paper 22 · Q7(a)

Arrays · 6 marks · official answer ready

(a) Write efficient pseudocode for module OutputError(). ..........................................................................................................................…

2022 October-November · Paper 22 · Q7(c)(i)

Arrays · 1 mark · official answer ready

(i) State the error in the record declaration. ....................................................................................................................................…

2022 October-November · Paper 22 · Q7(c)(ii)

Arrays · 2 marks · official answer ready

(ii) State two benefits of using the single array of the user-defined data type. 1 ................................................................................................…

2022 October-November · Paper 33 · Q3(d)(i)

Data types and records · 1 mark · official answer ready

(i) Write the pseudocode statement to set up a variable for one record of the composite data type Pet. ............................................................................…

2022 October-November · Paper 33 · Q3(d)(ii)

Data types and records · 3 marks · official answer ready

(ii) Write pseudocode to store the details of the following pet, in the variable you set up in part (d)(i). PetName AnimalType PetAge PetGender OwnerName Tibbles Cat 8 M Jasmine S…

2022 October-November · Paper 43 · Q1(d)(i)

Data types and records · 3 marks · official answer ready

(i) Write program code to call ReadFile() and FindValues() from the main program. The return value from FindValues() must be output with an appropriate message. Save your program.…

2022 October-November · Paper 43 · Q3(b)

Arrays · 2 marks · official answer ready

(b) The binary tree stores the following values: Index Left pointer Data Right pointer 0 1 20 5 1 2 15 –1 2 –1 3 3 3 –1 9 4 4 –1 10 –1 5 –1 58 –1 6 –1 –1 –1 FreeNode stores the in…

2021 October-November · Paper 21 · Q1(b)

Data types and records · 4 marks · official answer ready

(b) Complete the following table by giving the appropriate data type in each case. Use of variable Data type The average mark in a class of 40 students An email address The number…

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

Introduction to abstract data types · 0 marks

3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…

2021 October-November · Paper 21 · Q3(a)(i)

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

3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…

2021 October-November · Paper 21 · Q3(a)(ii)

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

3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…

2021 October-November · Paper 21 · Q3(a)(iii)

Introduction to abstract data types · 1 mark · official answer ready

3 (a) The diagram below represents a queue Abstract Data Type (ADT) that can hold a maximum of eight items. The operation of this queue may be summarised as follows: • The front o…

2021 October-November · Paper 21 · Q6(c)

Arrays · 6 marks · official answer ready

(c) The following new module is introduced: Module Description • Called with a row number as an INTEGER • Uses SearchInRow() to find the first and last columns in the given row wh…

2021 October-November · Paper 31 · Q10(c)

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

(c) Identify two ADTs other than a stack. 1 .......................................................................................................................................…

2021 October-November · Paper 31 · Q10(d)

Data types and records · 5 marks · official answer ready

(d) The function StackFull() checks whether a stack is full. The function uses the variable TopOfStack to represent the pointer to the most recent position used on the stack, and …

2021 October-November · Paper 41 · Q3(d)(i)

Arrays · 9 marks · official answer ready

(i) Edit the main program to perform the actions described. Save your program. Copy and paste the program code into part 3(d)(i) in the evidence document. [3]

2021 October-November · Paper 41 · Q3(d)(ii)

Arrays · 6 marks · official answer ready

(ii) Test the program by entering the data: 10 5 15 8 12 6 20 11 9

2021 May-June · Paper 11 · Q2(a)

Files · 4 marks · official answer ready

(a) Draw one line from each utility software to its correct description. Utility software Description Scans software for errors and repairs the problems Moves parts of files so th…