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.

2023 October-November · Paper 21 · Q8(b)

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 …

2023 October-November · Paper 21 · Q8(c)(i)

Files · 2 marks · official answer ready

(i) Explain why this is a problem. ........................................................................................................................................... ....…

2023 October-November · Paper 21 · Q8(c)(ii)

Files · 2 marks · official answer ready

(ii) Explain how the message format could be changed to allow a blank line to be sent. ............................................................................................…

2023 October-November · Paper 22 · Q1(a)

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…

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

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…

2023 October-November · Paper 22 · Q8(b)

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…

2023 October-November · Paper 22 · Q8(b)(iii)

Data types and records · 62 marks

(iii) State the file mode that should be used in CheckFiles(). ....................................................................................................................…

2023 October-November · Paper 22 · Q8(c)(ii)

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

2023 October-November · Paper 23 · Q3(a)

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

2023 October-November · Paper 23 · Q8(a)

Files · 15 marks · official answer ready

(a) Write pseudocode for procedure RandList(). ....................................................................................................................................…

2023 October-November · Paper 23 · Q8(b)(i)

Data types and records · 49 marks

(i) Write pseudocode to define MyType. ........................................................................................................................................... …

2023 October-November · Paper 31 · Q8

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…

2023 October-November · Paper 31 · Q8(a)

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…

2023 October-November · Paper 31 · Q10

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 …

2023 October-November · Paper 31 · Q10(a)

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 …

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

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 …

2023 October-November · Paper 32 · Q9(a)(i)

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…

2023 October-November · Paper 32 · Q9(a)(ii)

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…

2023 October-November · Paper 32 · Q9(b)

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

2023 October-November · Paper 32 · Q19(b)

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…