Cambridge Past Paper Questions
Browse 23,045questions from 25 years of O-Level & A-Level exams. Click any question to practice.
A program is being developed to calculate the pay of employees working for a company. A function CalculateBonus () calculates bonus pay based on t...
A student has been asked to create a simple guessing game program. This program will generate a random integer value between 1 and 100. It will the...
Study the algorithm: DECLARE Chars : ARRAY[1:4] OF CHAR DECLARE I, J : INTEGER DECLARE Key : CHAR I ← 2 Chars[1] ← 'D' Chars[2] ← 'T' Chars[3] ← '...
Stacks and queues are both abstract data types. A stack uses a top-of-stack pointer to indicate the location of the last item added to the stack. ...
A program monitors the speed of vehicles as they move around a large building site. Each vehicle contains a sensor which reads an integer value th...
A program is being developed to implement a customer loyalty scheme for a coffee shop. The programmer has decided that the following data items ne...
Refer to the insert for the list of pseudocode functions and operators. A program is being developed to control the production line in a factory.
A program to calculate the pay of employees working for a company is being designed.
An algorithm is designed to generate and output two unique random integers. Each integer value is between -10 and 10 inclusive. If both integers o...
An algorithm will: • input 100 integer values, one value at a time • store the first value input into the first location of the array Number • sto...
An automated digital camera system is used to take a sequence of pictures of animals in a garden. During the design of the system, a state-transiti...
Two arrays Data and Pointer are accessed by the procedure Place() Data and Pointer are both global arrays of type INTEGER The contents of these t...
A program is being developed to implement a customer loyalty scheme for a coffee shop. Each customer has a unique customer ID starting at 10001 wi...
A program is being developed for the management of a sports centre.
A programmer uses a number of Abstract Data Types (ADT) in the programs that she is developing. (a) A stack using memory locations 400 to 409 is us...
A programmer has been asked to create a module RollDice() to simulate multiple rolls of a dice. This module will be used as part of a program for a...
A programmer is developing a new stock control program for a shop owner to produce sales reports.
A module Parity() takes a string as a parameter. The parameter has the identifier BitString and it represents a binary value. The module will conca...
Study the structure chart: [Figure showing a structure chart with Main, Sub_A, Sub_B modules, and parameters M, P, R, Q, V, X, W, T, U. Sub_A calls...
A program is being developed to implement a customer loyalty scheme for a coffee shop. The programmer has decided that the following data items nee...
A programmer is writing a program to manage bookings for a small taxi company. The programmer requires some user-defined data types.
Numbers are stored in a computer using binary floating-point representation with: • 10 bits for the mantissa • 6 bits for the exponent • two's comp...
A linked list of nodes is used to store an ordered list of integers. Each node consists of the data, a left pointer and a right pointer, for exampl...
This truth table represents a logic circuit. INPUT OUTPUT A B C D Z 0 0 0 0 1 0 0 0 1 0 0 0 1 0 ...
Several syntax diagrams are shown. [Figure showing syntax diagrams for uppercase, lowercase, symbol, digit, passcode]
Secure Socket Layer (SSL) and Transport Layer Security (TLS) are two protocols.
A medical centre uses objects of the class Appointment to record treatments given and medication prescribed during each doctor's appointment. Some ...
The pseudocode algorithm checks whether a location in a stock file StockList.dat is empty or not. The location is given by the user. If the locatio...
Data types can be defined using pseudocode. The composite record data type, Departure, is used to represent flights from Cambridge Airport and is ...
Numbers are stored in a computer using binary floating-point representation with: • 12 bits for the mantissa • 4 bits for the exponent • two's comp...
Circuit switching may be used as a method of data transmission. State two benefits and two drawbacks of circuit switching. Benefit 1 Benefit 2 Draw...
The management and scheduling of processes are tasks carried out by an operating system.
Explain what is meant by lexical analysis during program compilation.
Several syntax diagrams are shown. [Figure X.X]
Identify the two main protocols that form Transport Layer Security (TLS) and state the purpose of each. Protocol 1 Purpose Protocol 2 Purpose
(a) A medical clinic uses objects of the class Patient to assign a priority and a doctor to a patient. Some of the attributes required in the class...
The pseudocode algorithm below uses random file access to copy 50 records from a live file CurrentResults.dat to a stored file StoredResults.dat on...
A programmer is writing a program to manage a video library. They require a user-defined data type.
Numbers are stored in a computer using binary floating-point representation with: • 8 bits for the mantissa • 8 bits for the exponent • two's compl...
This truth table represents a logic circuit.
The Internet layer and Link layer are two layers of the TCP/IP protocol suite.
Complete the table by filling in the missing object-oriented programming (OOP) terms and descriptions.