Cambridge Past Paper Questions
Browse 23,045questions from 25 years of O-Level & A-Level exams. Click any question to practice.
A school has a computerised library system that allows students to borrow books for a fixed length of time. The system uses text files to store det...
A computer shop assembles computers using items bought from several suppliers. A text file Stock.txt contains information about each item. Informa...
A program calculates the postal cost based on the weight of the item and its destination. Calculations occur at various points in the program and t...
A program stores a user's date of birth using a variable MyDOB of type DATE.
A program stores data in a text file. When data is read from the file, it is placed in a queue. (a) The diagram below represents an Abstract Data ...
A function GetNum() will: 1. take two parameters: a string and a character 2. count the number of times that the character occurs in the string 3. ...
A programmer has produced the following pseudocode to output the square root of the numbers from 1 to 10. Line numbers are for reference only. 10...
A procedure Square() will take an integer value in the range 1 to 9 as a parameter and output a number square. The boundary of a number square is ...
A computer system for a shop stores information about each customer. The items of information include name and address (both postal and email) toge...
Refer to the insert for the list of pseudocode functions and operators. The following pseudocode represents part of the algorithm for a program. Li...
A program stores a date of birth for a student using a variable, MyDOB, of type DATE.
A program processes data using a stack. The data is copied to a text file before the program ends. (a) The following diagram shows the current stat...
A function MakeString() will: 1. take two parameters: • a count as an integer • a character 2. generate a string of length equal to the cou...
A program is designed, coded and compiled without errors. The compiled code is sent for testing.
A procedure Select () will: 1. take two integer values as parameters representing start and end values where both values are greater than 9 and the...
A school has a library system which allows students to borrow books for a length of time. Information relating to students and books is stored in t...
A computer shop assembles desktop computers, using items bought from several suppliers. A text file Stock.txt contains information about each item....
Numbers are stored in two different computer systems by using floating-point representation. System 1 uses: • 10 bits for the mantissa • 6 bits for...
A hashing algorithm is used to calculate storage locations for records in a random access file. It calculates hash values by using the function mod...
Two descriptions of user-defined data types are given. Give appropriate type declaration statements for each, including appropriate names.
Several syntax diagrams are shown.
Outline the characteristics of massively parallel computers.
Encryption is used to alter data into a form that makes it meaningless if intercepted.
The pseudocode algorithm shown copies an active accounts text file ActiveFile.txt to an archive accounts text file ArchiveFile.txt, one line at a t...
Pseudocode is to be written to implement a queue Abstract Data Type (ADT) with items of the string data type. This will be implemented using the in...
Numbers are stored in a computer using floating point representation with: • 10 bits for the mantissa • 6 bits for the exponent • two's complement ...
Several syntax diagrams are shown. [Figure 4.1]
Draw one line from each Object-Oriented Programming (OOP) term to its most appropriate description. [Figure 6.1]
Encryption is used to scramble data to make it meaningless if intercepted.
This truth table represents a logic circuit. [Figure 10.1]
The pseudocode shown represents a queue Abstract Data Type (ADT) with procedures for initialisation and to add new items. It is incomplete.
A Fibonacci sequence is a series of numbers formed by adding together the two preceding numbers, for example: 0, 1, 1, 2, ... This function calcula...
A program reads data from a file and searches for specific data.
A computer game is being designed that will include different vehicles. A prototype for the game is being developed using object-oriented programmi...
A program implements two stacks using 1D arrays. One stack stores the names of colours. One stack stores the names of animals.
A 1D array needs to store the names of 10 animals.
A business sells a single product. Customers can purchase one or more of this product. Each sale has an ID and a quantity, for example "ABC" and 2 ...
A company needs a computer program to store data about its employees. Part of the program is being written using object-oriented programming. The c...
A computer game is being designed that users will be able to play using a virtual reality (VR) headset.
An assessment board scans exam papers and stores the digitised papers on a server. Exam markers download the digitised papers to mark. The exam mar...