Cambridge Past Paper Questions
Browse 23,045questions from 25 years of O-Level & A-Level exams. Click any question to practice.
Several syntax diagrams are shown. [Figure depicting 'upper', 'digit', and 'passcode' syntax diagrams]
The pseudocode algorithm below allows a user to input a new stock item. The random file is searched for the next empty location in the file and the...
An array is an Abstract Data Type (ADT).
The recursive procedure Delete() is defined as follows: PROCEDURE Delete(Index, Target) IF Numbers (Index) > 0 THEN IF Numbers[Index] >= Tar...
A program stores positive integers in a circular queue. The queue is stored as a global 1D array of 20 integers with the identifier Queue. Each ind...
A program reads data from a text file, splits the data depending on its content and stores the separated data into different files. The text file T...
A program stores data in a binary tree that is designed using Object-Oriented Programming (OOP). The tree stores data in ascending numerical order,...
A program reads data from a text file and stores it in a stack. The stack Stack is stored as a 1D array of up to 20 elements. The pointer TopOfStac...
A program stores data in a 1D array of records, HashTable. The array has space for 200 records. Each data item is stored in a specific index of the...
A program stores data about animals using Object-Oriented Programming (OOP). The class Animal stores the data about animals. Animal Name : String S...
A program reads data from a text file and stores it in a queue. The linear queue Queue is stored as a 1D array of up to 50 elements. The queue has ...
A program sorts the data in the 1D array DataArray and searches DataArray for specific values. DataArray stores 14 integer values and is declared l...
A program stores data in a linked list that is designed using Object-Oriented Programming (OOP). The class Node stores data about the nodes. Node T...
When designing computer systems, it is important to consider the security, integrity and privacy of the data. Draw one line from each measure to i...
Andy likes to play computer games.
A register stores the following binary number: 1 1 0 0 1 1 0 1
Riya has created the following logo as a vector graphic. [Figure showing a rectangle with the letter 'R' inside it]
A shop sells plants to customers. The shop manager has a relational database to keep track of the sales. The database, PLANTSALES, has the followi...
A computer has system software.
The Von Neumann model for a computer system uses registers.
Sylvia is testing a program that has been written by her colleague. Her colleague tells her that the program does not contain any syntax errors.
A program controls the heating system in a sports hall. Part of the program involves reading a value from a sensor. The sensor produces a numeric ...
The following data items will be recorded each time a student successfully logs on to the school network: Data item Example data Student ID ...
A mobile phone has a touchscreen. The screen is represented by a grid, divided into 800 rows and 1280 columns. The grid is represented by a 2D arr...
(a) An algorithm will: 1. input an integer value 2. jump to step 6 if the value is zero 3. sum and count the positive values 4. sum and count the n...
A programmer is writing a program to help manage clubs in a school. Data will be stored about each student in the school and each student may join ...
The following is a procedure design in pseudocode. Line numbers are given for reference only. 10 PROCEDURE Check(InString : STRING) 11 DECLARE Odd...
A company has several departments. Each department stores the name, email address and the status of each employee in that department in its own tex...
An algorithm to sort a 1D array into ascending order is described as follows: • move the largest value to the end • keep repeating until the array ...
A program controls the heating system in a sports hall. Part of the program involves reading a value from a sensor. The sensor produces a numeric v...
Numbers are stored in a computer using floating-point representation with: • 12 bits for the mantissa • 4 bits for the exponent • two's complement ...
Draw one line from each programming paradigm to its most appropriate description. [Figure 2.1]
Enumerated and pointer are two non-composite data types.
The following syntax diagrams for a particular programming language show the syntax of: • a digit • a capital letter • a character. [Figure 4.1]
(a) Write the Boolean expression that corresponds to the given truth table as a sum-of-products. INPUT OUTPUT A B C D Z 0 0 0 0 0 0 0 0 1 ...
(a) The diagram shown represents an artificial neural network. [Figure 9.1]
The function StackFull() checks whether a stack is full. The function uses the variable TopOfStack to represent the pointer to the most recent pos...
Draw one line from each programming paradigm to its most appropriate description. Programming paradigm Declarative Imperative Low-level Object-ori...
The diagram shown represents an artificial neural network.
Study the following pseudocode for a recursive function. FUNCTION Unknown(BYVAL X, BYVAL Y : INTEGER) RETURNS INTEGER IF X < Y THEN OUTPUT X + Y RE...
A program, written using object-oriented programming, stores pictures as objects. The program stores the dimensions of the picture (width and heigh...