Arrays, Tuples & Records: Core Data Structures (OCR A-Level CS 1.4.2)
OCR A-Level CS 1.4.2: arrays (1D, 2D and 3D), records, lists and tuples — what each is, how to declare and index them, and how they differ.

Free Arrays Tuples Records revision resources (OCR A-Level Computer Science, 1.4.2)
We’ve made exam-style practice for this exact topic, free to download: Arrays Tuples Records question sheet, mark scheme and cheat sheet. Grab them, have a go, then read the full guide below.
Programs need to store collections of data, and the structure you choose changes what you can do with it. Spec point 1.4.2(a) covers arrays (up to three dimensions), records, lists and tuples. OCR sets reliable questions here — declaring a 2-D array, explaining the difference between an array and a list, or how a tuple differs from a list — so knowing the precise distinctions is worth easy marks.
Let's define each one and, crucially, what sets them apart.

Arrays
An array is an ordered collection of elements that are all the same data type, stored under one identifier and accessed by an index. Arrays are usually a fixed size (static) and indexed from 0.
A 1-D array is a simple list of values:
scores[0],scores[1], … You declare it likearray scores[10](10 elements).A 2-D array is a grid (rows × columns), accessed by two indices:
grid[row][column]. You can picture it as a table — useful for a board, a timetable, or distances between cities.A 3-D array adds another dimension (think "a stack of 2-D tables"), accessed by three indices.
To declare a 2-D array of 3 rows and 4 columns you might write array grid[3, 4] (syntax varies by language). To total a row you loop the column index; to total a column you loop the row index.
Records

A record groups together related fields of (possibly) different data types under one structure — like one row of a database table. For example a Student record might hold a name (string), an age (integer) and a memberFee (real) together. Each field has a name, and you access it with dot notation, e.g. student.name.
Records are ideal when one "thing" has several attributes of different types — which is exactly why OCR asks you to "complete the pseudocode to declare a record":
The key contrast with an array: an array holds many items of the same type; a record holds several different fields describing one item.
Lists
A list is an ordered, dynamic collection — it can grow and shrink at run time, and (in most languages) can hold items of different data types. Lists come with built-in operations such as append, remove, insert, pop and index, which makes them very flexible.
Tuples
A tuple is an ordered collection like a list, with one crucial difference: a tuple is immutable — once created, its contents cannot be changed. Tuples are useful for storing values that should stay fixed, such as a coordinate (x, y) or a constant set of options.
The differences that earn marks

Feature | Array | List | Tuple |
|---|---|---|---|
Size | Fixed (static) | Dynamic (grows/shrinks) | Fixed once created |
Data types | All the same | Can be mixed | Can be mixed |
Mutable? | Elements can change | Yes | No — immutable |
Access | By index | By index | By index |
The two distinctions examiners ask for most:
Array vs list: an array is a fixed size holding one data type; a list is dynamic and can hold mixed types with built-in add/remove operations.
Tuple vs list: a tuple is immutable (cannot be changed after creation); a list is mutable.
Worked example: choosing a structure
A program stores the prices of flights between every pair of 8 airports. Which structure? A 2-D array prices[8, 8] fits perfectly: it's a fixed-size grid of the same data type (a price), and prices[from][to] reads the fare directly. If instead you needed to store one passenger's varied details — name, age, frequent-flyer status — a record is right, because those are different fields describing one person. And if you needed a growing list of bookings that you add to and remove from during the day, a list is the natural choice.
Common exam mistakes
Saying an array can hold mixed types. An array holds one data type; mixing types is a feature of lists.
Confusing record and array. A record = different named fields for one item; an array = many items of the same type.
Forgetting tuples are immutable. That immutability is usually the whole point of the question.
Off-by-one indexing. Arrays are indexed from 0, so an array of
nelements runs0ton−1.Wrong 2-D access order. It's
array[row][column]— keep the indices the right way round.
Quick recap
Array: fixed size, all one data type, indexed from 0; can be 1-D, 2-D (
grid[row][col]) or 3-D.Record: several named fields of different types describing one item (e.g. a student).
List: dynamic (grows/shrinks), can hold mixed types, with built-in operations.
Tuple: ordered but immutable — cannot be changed once created.
Array vs list = fixed/one-type vs dynamic/mixed; tuple vs list = immutable vs mutable.
Frequently asked questions
What is an array? An array is an ordered collection of elements that are all of the same data type, stored under one identifier and accessed by an index starting at 0. Arrays are usually a fixed size and can have one, two or three dimensions, such as grid[row][column] for a 2-D array.
What is the difference between an array and a list? An array is a fixed size and holds elements of a single data type, whereas a list is dynamic — it can grow and shrink at run time — and can usually hold items of different data types, with built-in operations such as append, remove and insert.
What is a record? A record is a data structure that groups together several related fields, which may be of different data types, under one structure. For example, a student record could hold a name as a string, an age as an integer and a fee as a real, with each field accessed by name.
What is a tuple and how is it different from a list? A tuple is an ordered collection of values, similar to a list, but it is immutable, meaning its contents cannot be changed after it is created. A list, by contrast, is mutable and can be changed by adding, removing or replacing elements.
How do you access an element in a two-dimensional array? You use two indices, one for the row and one for the column, written as array[row][column]. For example, in a 2-D array storing a grid of values, grid[2][3] accesses the value in row 2, column 3, with both indices counting from 0.
When would you use a record instead of an array? You use a record when one item has several attributes of different data types that belong together, such as a person's name, age and fee. An array is used instead when you need to store many items that are all of the same data type.


