Cambridge Past Paper Questions
Browse 23,045questions from 25 years of O-Level & A-Level exams. Click any question to practice.
A pseudocode algorithm finds a customer account record in a random file and outputs it. The records are stored using the user-defined data type TAc...
A stack is to be set up using the information in the table. [Table with Identifier: BasePointer, TopPointer, Stack; Data type: INTEGER, INTEGER, RE...
A declarative programming language is used to represent subjects that students can choose to study. Students must choose two subjects. [List of cla...
Real numbers are stored in a computer using floating point representation with: • 10 bits for the mantissa • 6 bits for the exponent • two's comple...
Describe what is meant by composite and non-composite data types.
The location of a record in a random file is determined using a hashing algorithm. A collision may occur during the process of adding a record.
Complete the following paragraph about a protocol suite, using words from the given list. Some words are not used. BitTorrent circuit switching lay...
The Reverse Polish Notation (RPN) expression: ab*2/cd/* is to be evaluated where a = 20, b = 3, c = 10 and d = 5.
This logic circuit represents the Boolean expression: X = A + B + C [Figure X.X]
Calculate the shortest distance between the Start and each of the destinations in the diagram using Dijkstra's algorithm. Show your working and wri...
A stack Abstract Data Type (ADT) is to be implemented using pseudocode, with procedures to initialise it and to push new items onto the stack. A 1D...
Describe the features of the SIMD and MISD computer architectures.
A declarative programming language is used to represent some facts about people and their hobbies. 01 hobby(music). 02 hobby(caving). 03 hobby(clim...
This diagram represents a logic circuit. [Figure 6.1]
A stack is to be set up using the information in the table. Identifier BasePointer TopPointer Stack Data type INTEGER INTEGER REAL Description poin...
This iterative pseudocode algorithm for the function IterativeVowels() takes a string as a parameter and counts the number of lower-case vowels in ...
A linear queue is implemented using the 1D array, Queue. The index of the first element in the array is 0.
A computer game is written using object-oriented programming. The game has multiple characters that can move around the screen. The class Character...
A program stores lower-case letters in two stacks. One stack stores vowels (a, e, i, o, u) and one stack stores consonants (letters that are not vo...
An integer is said to be divisible by another integer if the result of the division is also an integer. For example: 10 is divisible by 1, 2, 5 and...
A computer game is written using object-oriented programming. The game has multiple characters. The class Character stores data about the game char...
Complete the truth table for the logic expression: X = (A XOR B) NAND (A AND (B XOR C)) [Figure 1.1: Truth table with columns A, B, C, Working spa...
Embedded systems are used in many electronic devices.
A student has a computer.
A program is written in a high-level language by a team of three programmers using an Integrated Development Environment (IDE).
A computer programmer is learning about the importance of acting ethically at work.
A company uses a relational database to store data about its customers, employees and the individual repair jobs that customers have booked.
A student takes a photograph of a science experiment.
A road bridge has a weight limit and a height limit for vehicles. For example, a vehicle must weigh less than 10000 kg and must have a height of le...
A program will calculate the tax payable based on the cost of an item. Calculations will occur at many places in the program and these involve the ...
A program uses three global integer variables HH, MM and SS to represent the current time in hours, minutes and seconds using the 24-hour clock not...
An algorithm will output the last three lines from a text file Result.txt The lines need to be output in the same order as they appear in the file....
A program includes the following assignment statement: Result ← STR_TO_NUM(x) / STR_TO_NUM(y) When the program evaluates the expression in the stat...
A software developer follows a program development life cycle. The life cycle divides the development process into various stages.
A factory produces food items. The items must be used within a certain number of days after their production date. The number of days is known as t...
A program contains six modules with headers as follows: Pseudocode module header PROCEDURE Connect() FUNCTION Activate(H1 : STRING, Code : INTEGER)...
An exam paper has a maximum of 75 marks. One of five pass grades (A to E) is assigned, depending on the mark obtained. The lowest mark for a given ...
Refer to the insert for the list of pseudocode functions and operators. A program has been developed and released for general use. After a few mont...
A program is being developed to process bank card information. When a card number is displayed, all the characters except the last four are replace...
A program uses a stack to hold up to 60 numeric values. The stack is implemented using two integer variables and a 1D array. The array is declared ...
A global integer variable Tick is always incremented every millisecond (1000 times per second) regardless of the other programs running. The value ...
A program contains a global 1D array Data with 100 elements of type INTEGER. The program contains a function Process() expressed in pseudocode as f...
A shop sells sandwiches and snacks. The owner chooses a 'daily special' sandwich which is displayed on a board outside the shop. Each 'daily specia...