Cambridge Past Paper Questions
Browse 23,045questions from 25 years of O-Level & A-Level exams. Click any question to practice.
Supervised and unsupervised learning are two categories of machine learning. Describe supervised learning and unsupervised learning.
A simplified linked list is used to store the names of flowers in alphabetical order. It is implemented using two 1D arrays: • Flower stores the n...
Outline the functions of the Transport and Internet layers of the TCP/IP protocol suite. Transport layer Internet layer
The array Names [0:99] is in alphabetical order.
The text file IntegerData.txt stores 100 integer numbers between 1 and 100 inclusive. A program is required to read in this data and perform search...
A computer program is being developed that uses a set of cards. The program is written using object-oriented programming. The program has two class...
A binary tree consists of nodes. Each node has 3 integer values: a left pointer, data and a right pointer. The binary tree is stored using a global...
A computer program is needed to store jobs in order of priority. Each job has a job number (for example, 123) and a priority from 1 to 10, with 1 b...
A computer game is being developed. The game has 10 different characters that are all active in the game. Part of the game is being written using o...
A program uses a linear queue to store up to 100 integers.
A factory makes chocolate bars. The factory uses a conveyor belt that moves the products from one stage of production to the next stage.
A Local Area Network (LAN) contains four devices: • a router • two laptop computers • a server.
A computer has an Operating System (OS).
Refer to the insert for the list of pseudocode functions and operators. 1 The following pseudocode represents part of the algorithm for a program: ...
2 An algorithm is expressed as follows: • input 100 numbers, one at a time • keep a total of all numbers input that have a value between 30 and 70 ...
3 The diagram represents an Abstract Data Type (ADT). The operation of this stack may be summarised as follows: : The TopOfStack pointer points to ...
4 A global array is declared in pseudocode as follows: DECLARE Data : ARRAY[1:150] OF STRING A function TooMany() will: 1. take two parameters: • a...
5 An algorithm is designed to find the smallest numeric value from an input sequence and count how many numeric values have been input. An example ...
6 The pseudocode OUTPUT command starts each output on a new line. (a) A new procedure MyOutput() will take a string and a Boolean parameter. MyOutp...
7 An algorithm is represented by a state-transition diagram. The table shows the inputs, outputs and states for the algorithm: Current state | Inpu...
8 A class of students are developing a program to send data between computers. Many computers are connected together to form a wired network. Seria...
A shop sells car accessories. A customer order is created if an item cannot be supplied from current stock. A program is being developed to create ...
An algorithm will: 1. input a sequence of integer values, one at a time 2. ignore all values until the value 27 is input, then sum the remaining va...
The diagram represents a linked list Abstract Data Type (ADT). • Ptr1 is the start pointer. Ptr2 is the free list pointer. • Labels D40, D32, D11 a...
A procedure Count() will: 1. input a value (all values will be positive integers) 2. count the number of odd values and count the number of even va...
A global 1D array of integers contains four elements, which are assigned values as shown: Mix[1] ← 1 Mix[2] ← 3 Mix[3] ← 4 Mix[4] ← 2 A procedure P...
A program contains six modules: [Table of Pseudocode module header] Module-X() calls Reset() Module-Y() calls Restore()
A class of students are developing a program to send data between computers. Many computers are connected together to form a wired network. Serial ...
Data is a 1D array of integers, containing 30 elements. All element values are unique.
The diagram represents a queue Abstract Data Type (ADT). The organisation of this queue may be summarised as follows: • The FrontOfQueue pointer p...
A procedure RandList() will output a sequence of 25 random integers, where each integer is larger than the previous one.
A global 1D array of integers contains four elements, which are assigned values as shown: Mix[1] ← 4 Mix[2] ← 2 Mix[3] ← 3 Mix[4] ← 5 A procedure...
A function TestNum() will take a six-digit string as a parameter. The function will test whether the string meets certain conditions and will retu...
A structure chart shows the modular structure of a program: [Figure X.X showing a structure chart with Module-A() calling Sub-Y1(), Sub-Y2(), and S...
Real numbers are stored in a computer using floating-point representation with: • 12 bits for the mantissa • 4 bits for the exponent • two's comple...
This diagram represents a logic circuit. [Figure with logic circuit diagram showing inputs A, B, C, D and output Z]
A student buys a new computer.