Computer Science For First Examination In 2021 9618 · 11

Programming

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

2025 October-November · Paper 11 · Q10(b)

Constructs · 1 mark · official answer ready

(b) State why a 3D printer needs a buffer. ........................................................................................................................................…

2025 October-November · Paper 12 · Q8(a)(i)

Constructs · 2 marks · official answer ready

(i) Give two benefits of storing data using cloud computing. 1 ....................................................................................................................…

2025 October-November · Paper 13 · Q8(d)

Constructs · 3 marks · official answer ready

(d) Memory management is one key management task performed by an OS. Give three other key management tasks that are performed by an OS. 1 .........................................…

2025 October-November · Paper 21 · Q7(a)

Programming basics · 5 marks · official answer ready

(a) One part of the program contains an algorithm which is represented by a state-transition diagram. The table shows the inputs, outputs and states for the algorithm: Current sta…

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

Constructs · 4 marks · official answer ready

1 (a) The table contains pseudocode examples. Each example may contain statements that relate to one or more of: • selection • iteration (repetition) • subroutines (procedures or …

2025 October-November · Paper 22 · Q8(d)

Constructs · 2 marks · official answer ready

(d) It is decided to extend the program so that a new module Reminder() will send an email to the student three days before the book is due to be returned. Outline the changes tha…

2025 October-November · Paper 23 · Q6(a)

Structured programming · 2 marks · official answer ready

(a) A function Generate() is written to take an original number as a parameter and to return the check digit. Outline a test plan that could be used to fully test function Generat…

2025 October-November · Paper 23 · Q7(a)

Programming basics · 5 marks · official answer ready

(a) One part of the program contains an algorithm which is represented by a state-transition diagram. The table shows the inputs, outputs and states for the algorithm: Current sta…

2025 October-November · Paper 23 · Q8(c)(iii)

Constructs · 2 marks · official answer ready

(iii) One way of storing the data items in a text file is to store each data item on a separate line. Identify one benefit and one drawback of this way of storing the data. Benefi…

2025 October-November · Paper 31 · Q9(a)(i)

Constructs · 5 marks · official answer ready

(i) Complete the pseudocode for the function to remove a data item from the stack. FUNCTION Pop() .................................................................................…

2025 October-November · Paper 31 · Q11(b)

Constructs · 1 mark · official answer ready

(b) The address 632 contains the value 45. State the value of Answer after the code described in part (a) has executed. ...........................................................…

2025 October-November · Paper 32 · Q12(a)(i)

Constructs · 4 marks · official answer ready

(i) Complete the pseudocode for the procedure to add a data item onto the stack. PROCEDURE Push(...................................................................................…

2025 October-November · Paper 32 · Q12(a)(ii)

Programming basics · 2 marks · official answer ready

(ii) Write pseudocode to input a new data item and add it to the stack using Push(). ..............................................................................................…

2025 October-November · Paper 41 · Q1(c)

Constructs · 4 marks · official answer ready

(c) The function Pop() returns the next integer in the stack and updates the pointer as appropriate. If there is no data in the stack, the function returns the value –999 Write pr…

2025 October-November · Paper 41 · Q1(d)

Constructs · 4 marks · official answer ready

(d) The main program generates 40 random integers between 0 and 1000 (inclusive) and attempts to insert each one into the stack using the appropriate function. If the return value…

2025 October-November · Paper 41 · Q1(e)

Constructs · 4 marks · official answer ready

(e) The procedure FindValues(): • pops each integer from the stack until the stack is empty • finds and outputs the largest number that was in the stack in an appropriate message …

2025 October-November · Paper 42 · Q2(b)

Structured programming · 3 marks · official answer ready

(b) The procedure PrintArray() takes an integer array as a parameter. The procedure outputs the array contents on a single line with a space between each integer. Write the progra…

2025 October-November · Paper 42 · Q2(c)

Constructs · 5 marks · official answer ready

(c) The function BubbleSort(): • takes an integer array as a parameter • sorts the data into ascending order using a bubble sort • returns the sorted array. The function needs to …

2025 October-November · Paper 42 · Q3(e)(ii)

Constructs · 1 mark · official answer ready

(ii) Test your program. Take a screenshot that shows all of the content stored in the file Tree.txt In this screenshot you need to make sure the filename is visible. Save your pro…

2025 October-November · Paper 43 · Q2(b)

Structured programming · 5 marks · official answer ready

2 A program reads string data from a text file into a linear queue and then compresses the data. The queue is created using the global 1D array Queue. The queue can store up to 10…