Programming
468 questions. Open a question to solve it and check the official answer.
Constructs · 7 marks · official answer ready
(b) The school awards a prize each year to the students who achieve the highest mean mark in their form. Produce an algorithm for a procedure called PRIZE which will determine whi…
Constructs · 4 marks · official answer ready
(i) Describe how the file can be searched serially for all records with ID number 23714. [4]
Constructs · 3 marks · official answer ready
(b) The following ID numbers are to be sorted into numerical order, with the smallest first. Describe an algorithm for implementing an insertion sort on the above data. [3]
Constructs · 5 marks · official answer ready
(i) Describe an algorithm that will merge A and B to form T. [5]
Constructs · 5 marks · official answer ready
(ii) Describe a binary search algorithm that can be used to find the details of a particular employee with ID number 21478 after the files have been merged. [5]
Constructs · 6 marks · official answer ready
(a) State three other types of generic applications software which would be useful to help the workers in the management of the garage. In each case say what it would be used for.…
Constructs · 2 marks · official answer ready
(ii) Identify a task from this application which will require rapid response processing, justifying your answer. [2]
Constructs · 3 marks · official answer ready
(c) Describe how the algorithm can be used to calculate the tax for each person in the city without it having to be rerun. [3] reasonable effort has been made by the publisher (UC…
Constructs · 6 marks · official answer ready
(ii) It is decided to store the index as a linked list. Describe an algorithm for the insertion of a new student. [6] 3
Programming basics · 1 mark · official answer ready
(i) State what is meant by a real-time application. [1]
Constructs · 6 marks · official answer ready
(b) A burglar alarm system uses a number of sensors to collect information. State three types of sensor which could be used to collect data, saying why each is necessary. [6]
Constructs · 3 marks · official answer ready
(a) direct implementation, [3]
Structured programming · 2 marks · official answer ready
(i) Explain the difference between a local variable and a global variable. [2]
Structured programming · 2 marks · official answer ready
(ii) Explain the difference between passing a parameter by value and by reference. [2]
Structured programming · 2 marks · official answer ready
(i) variables to hold the three examination marks, [2]
Structured programming · 2 marks · official answer ready
(ii) total mark. [2] 3
Constructs · 0 marks
4 1 X=1 2 REPEAT 3 A=X*X 4 OUTPUT X, A
Programming basics · 1 mark · official answer ready
(i) State what is meant by verification of data. [1]
Structured programming · 2 marks · official answer ready
(ii) Describe what is meant by a function. [2]
Constructs · 4 marks · official answer ready
(c) A set of data items is stored in a sorted binary tree. Describe a procedure which will insert a new data item into the correct position in the sorted binary tree. [4]
