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.

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

Files · 3 marks · official answer ready

(a) Bobby tells Kim that a file-based approach is usually better than a relational database. Explain why Bobby is incorrect. ......................................................…

2021 May-June · Paper 13 · 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…

2021 May-June · Paper 13 · Q7(a)

Files · 3 marks · official answer ready

(a) Bobby tells Kim that a file-based approach is usually better than a relational database. Explain why Bobby is incorrect. ......................................................…

2021 May-June · Paper 23 · Q1(a)

Data types and records · 4 marks · official answer ready

1 (a) A program is being developed to help manage the membership of a football club. Complete the following identifier table. Example Explanation Variable name Data type value The…

2021 May-June · Paper 23 · Q1(c)

Data types and records · 3 marks · official answer ready

(c) The following data items need to be stored for each student in a group: • student name (a string) • test score (an integer). State a suitable data structure and justify your a…

2021 May-June · Paper 23 · Q2(b)

Data types and records · 2 marks · official answer ready

(b) The definition for module LoanReturn() is amended as follows: Module name Description Called with parameters LoanID, BookID and Fine LoanReturn() The module code checks whethe…

2021 May-June · Paper 23 · Q3(a)(i)

Files · 2 marks · official answer ready

(i) Explain how the program could use text files to speed up the process. .........................................................................................................…

2021 May-June · Paper 23 · Q4(b)

Data types and records · 2 marks · official answer ready

(b) The pseudocode for Convert() contains a conditional loop. State a more appropriate loop structure. Justify your answer. Loop structure ........................................…

2021 May-June · Paper 23 · Q4(c)(i)

Data types and records · 1 mark · official answer ready

(i) Change 1 may be implemented by modifying one line of the pseudocode. Write the modified line. .................................................................................…

2021 May-June · Paper 23 · Q4(c)(ii)

Data types and records · 2 marks · official answer ready

(ii) Change 2 may be implemented by moving one line of the pseudocode. Write the number of the line to be moved and state its new position. Line number ...........................…

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

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

(a) Explain how a node containing data value B is added to the list in alphabetic sequence. .......................................................................................…

2021 May-June · Paper 23 · Q6(b)

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

(b) Describe how the linked list in part (a) may be implemented using variables and arrays. .......................................................................................…

2021 May-June · Paper 31 · Q8(b)

Arrays · 6 marks · official answer ready

(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one- dimensional array into descending order, and orders the corresponding students’ name…

2021 May-June · Paper 32 · Q8(b)

Arrays · 6 marks · official answer ready

(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one- dimensional array into descending order, and orders the corresponding students’ name…

2021 May-June · Paper 33 · Q8(b)

Arrays · 6 marks · official answer ready

(b) The given algorithm is a simple bubble sort that arranges a set of scores stored in a one- dimensional array into descending order, and orders the corresponding students’ name…

2021 May-June · Paper 42 · Q1(a)

Data types and records · 2 marks · official answer ready

(a) The following is pseudocode for the record type node. TYPE node DECLARE data : INTEGER DECLARE nextNode : INTEGER ENDTYPE Write program code to declare the record type node. S…

2021 May-June · Paper 42 · Q1(c)(ii)

Arrays · 1 mark · official answer ready

(ii) Edit the main program to call the procedure outputNodes(). Take a screenshot to show the output of the procedure outputNodes(). Save your program. Copy and paste the screensh…

2021 May-June · Paper 42 · Q1(d)(ii)

Data types and records · 3 marks · official answer ready

(ii) Edit the main program to: • call addNode() • output an appropriate message depending on the result returned from addNode() • call outputNodes() twice; once before calling add…

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

Data types and records · 2 marks · official answer ready

(a) Write program code for a new program to: • declare the global 1D array, arrayData, with ten elements • initialise arrayData in the main program using the data values shown. Sa…

2021 May-June · Paper 43 · Q1(a)

Data types and records · 2 marks · official answer ready

(a) The following is pseudocode for the record type node. TYPE node DECLARE data : INTEGER DECLARE nextNode : INTEGER ENDTYPE Write program code to declare the record type node. S…