Cambridge Past Paper Questions
Browse 23,045questions from 25 years of O-Level & A-Level exams. Click any question to practice.
Study the following pseudocode. Line numbers are for reference only. 10 PROCEDURE Encode () 11 DECLARE CountA, CountB, ThisNum : INTEGER 12 DECLARE...
A string represents a series of whole numbers, separated by commas. For example: "12,13,451,22" Assume that: • the comma character ',' is used as a...
A programming language has string functions equivalent to those given in the insert. The language includes a LEFT() and a RIGHT() function, but it ...
A program allows a user to save passwords used to log in to websites. A stored password is then inserted automatically when the user logs in to the...
A program has been written to implement a website browser and maintenance is now required. One type of maintenance is called perfective. Name two o...
Four program modules are defined as follows: | Pseudocode module header | |---| | PROCEDURE Sub1_A(XT : INTEGER, PB : STRING) | | FUNCTION Sub1_B(...
Items in a factory are weighed automatically. The weight is stored as an integer value representing the item weight to the nearest gram (g). A fun...
A program will store attendance data about each employee of a company. The data will be held in a record structure of type Employee. The fields tha...
The factorial of a number is the product of all the integers from 1 to that number. For example: factorial of 5 is given by 1 × 2 × 3 × 4 × 5 = 120...
The following pseudocode represents an algorithm intended to output the last three lines as they appear in a text file. Line numbers are provided f...
The following diagram shows the incomplete waterfall model of the program development life cycle. [Diagram shows incomplete waterfall model with 'A...
Data types can be defined using pseudocode. The data type, LibraryRecord, is defined in pseudocode as: TYPE LibraryRecord DECLARE Title : STRING DE...
A declarative language is used to represent the following facts about cats. 01 type(leopard, wild). 02 type(lion, wild). 03 type(cheetah, wild). 04...
Data can be sent over networks using either circuit switching or packet switching.
Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are two types of processor.
Part of a program's calculations uses the integer variables j, k, m, n and p. j = 3 k = 2 m = 10 n = (j + k)/(j - k) p = m * (m - j * k)
A virtual machine is used to emulate a new computer system.
A program is to be written using Object-Oriented Programming (OOP) for a shop that sells knitting yarn. There are three types of yarn: acrylic, woo...
A message is to be sent securely. Software uses a key to encrypt the message before it is sent.
The table shows assembly language instructions for a processor that has one general purpose register, the Accumulator (ACC). Instruction Table: Lab...
Data types can be defined using pseudocode. The data type, BuildingRecord, is defined in pseudocode as: TYPE BuildingRecord DECLARE BuildingID : IN...
A declarative language is used to represent the following facts about a school. 01 teaches(alan, mathematics). 02 teaches(ioana, geography). 03 tea...
The TCP/IP protocol suite has four layers. The application layer provides user services.
The following syntax diagrams show the syntax of: • a variable • an unsigned integer • a letter a digit • an operator • an assignment statement. [F...
There are four basic categories of computer architecture. Single Instruction Single Data (SISD) is one architecture. Identify the three other categ...
A logic circuit has two inputs A and B, and two outputs E and F. [Figure X.X showing a logic circuit with inputs A, B and outputs E, F]
A digital signature is used to validate the authenticity of an electronic message. In order to produce a digital signature, a digital certificate i...
A binary search or a linear search can be used to look for a specific value in an array.
State the reasons for including exception handling routines when writing a program. Include an example of an exception in your answer.
Data can be sent over networks using either circuit switching or packet switching. Describe both methods of data transmission. Include a different ...
A virtual machine is used to emulate a new computer system. Describe two benefits and one limitation of using a virtual machine for this purpose. B...
The text file HighScore.txt stores the players who have scored the top ten scores in a game, in descending order of score. The file stores the 3-ch...
A computer game is being developed using object-oriented programming. One element of the game is a balloon. This is designed as the class Balloon. ...
A program uses a circular queue to store strings. The queue is created as a 1D array, QueueArray, with 10 string items. The following data is store...
A program needs to use a stack data structure. The stack can store up to 10 integer elements. A 1D array StackData is used to store the stack globa...
A 2D array stores data entered by a user.
A programmer is designing a computer game that uses a set of cards. Each card has a number and a colour. The cards are saved in the text file CardV...
A company has a LAN (local area network).
A horse riding school uses a database, Lessons, to store data about lesson bookings. This database is created and managed using a Database Manageme...
A program is written in assembly language.
Data in a computer is stored in binary form.
A student has purchased a new laptop.
A software developer is working in a team writing a program for a client.
Refer to the insert for the list of pseudocode functions and operators. A programmer has written a program which includes the function Calculate()....
A program contains an algorithm to output a string of a specified length containing identical characters.
Customers collect points every time they make a purchase at a store. A program is used to manage the points system and the table lists some of the ...
Function Replace() will: 1. take three parameters: • a string (the original string) • a char (the original character) • a char (the new character) ...
Several companies are developing websites to market a new type of games console. The company that is first to create a website that can demonstrate...
A video-conferencing program supports up to six users. Speech from each user is sampled and digitised (converted from analogue to digital). Digitis...