Arrays and Records
Aligned to the OCR J277 specification
- Level
- Intermediate
- Reading time
- 6 min
- Published
- 11 June 2026
- Updated
- 1 July 2026
On this page
Key takeaways
- An array is a fixed-length, ordered collection of elements of the same data type, accessed by index starting at 0 - its size cannot change at runtime.
- A 2D array organises data in rows and columns; element at row r, column c is accessed as grid[r][c] - the first index is always the row.
- A record groups related data of different data types under one named structure, unlike an array where all elements must be the same type.
- When searching for a maximum value, always initialise the variable with the first element of the array (array[0]), not 0, to handle arrays containing negative values.
Studying this for an exam?
Generate a personalised learning path for this subject. Free to get started.
Key terms
- Array
- A fixed-length, ordered collection of elements all of the same data type, stored under a single variable name and accessed by index.
- Index
- The position of an element in an array, starting at 0 for the first element.
- 1D array
- A single row of elements accessed by one index (e.g. scores[2] for the third element).
- 2D array
- An array of arrays organised into rows and columns, accessed by two indices: grid[row][col].
- Traversal
- Visiting every element in an array in order, typically using a loop that iterates from index 0 to the last index.
- Record
- A data structure that groups related fields of different data types together under one named structure to represent a single entity.
- Field
- One named attribute within a record, such as name (String) or age (Integer).
- Fixed-length
- A property of arrays meaning their size is declared at creation and cannot be increased or decreased while the program is running.
- Random access
- The ability to read or write any element of an array directly by its index in constant time, without stepping through other elements.
Frequently asked questions
An array stores multiple values of the same data type under one name, accessed by index. A record groups multiple fields of different data types (e.g. name as String, age as Integer) that all describe one entity.
Use nested loops - an outer loop for rows and an inner loop for columns. Access any element with grid[row][col], where the first index is the row and the second is the column. For example, grid[1][2] is row 1, column 2.
OCR J277 defines arrays as static structures whose size is set when created and cannot grow or shrink at runtime. Even though Python lists can grow, in exam answers you must treat arrays as fixed-length.
Generate revision on any topic you study
Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.
Lessons on anything
Structured, level-matched lessons on any topic you study
Practice quizzes
Find out what you actually know before the exam does
Flashcard sets
Lock in key concepts with instant revision cards
Ask Aica
Stuck on something? Get a clear explanation, any time
String Manipulation and File Handling
SQL Basics
Related lessons
7 min
6 min
7 min
9 min