Arrays and Abstract Data Types
Aligned to the AQA 7517 specification
- Level
- Intermediate
- Reading time
- 5 min
- Published
- 13 June 2026
- Updated
- 1 July 2026
On this page
Key takeaways
- An array stores a fixed number of elements of the same data type in contiguous memory locations, each accessed by an integer index.
- AQA pseudocode uses 1-based indexing by convention, so the first element is at index 1, while Python, Java, and C++ use 0-based indexing.
- An abstract data type (ADT) defines a data structure by its behaviour (the operations it supports) without specifying how it is implemented internally.
- A stack is an ADT that could be implemented using an array or a linked list; describing a stack as an array conflates the abstraction with one particular implementation.
- Sequential access must read records in order from the beginning, whereas random access computes the address of any record directly: address = start + (N − 1) × record size.
Want more lessons like this one?
Generate lessons on anything you study. Free account, no card needed.
Key terms
- Array
- A data structure that stores a fixed number of elements of the same data type in contiguous memory locations.
- Index
- An integer that specifies the position of an element within an array.
- Two-dimensional array
- An array that stores data in rows and columns, accessed with two indices as array[row][column].
- Sequential access
- Access where data must be read from the beginning in order, so reaching record 50 requires reading records 1 through 49 first.
- Random access
- Access where any record can be reached directly by computing its position (address).
- Abstract data type (ADT)
- A data structure defined in terms of the operations it supports, without specifying how it is implemented internally.
- Stack
- An ADT with push, pop, peek, and isEmpty operations whose defining property is LIFO (last in, first out).
- Queue
- An ADT with enqueue, dequeue, and isEmpty operations whose defining property is FIFO (first in, first out).
Frequently asked questions
An abstract data type (ADT) defines a data structure by the operations it supports, while the implementation specifies how those operations are carried out. Code that uses an ADT depends only on its interface, so the implementation can change (e.g. array-based to linked-list-based) without affecting calling code.
AQA pseudocode uses 1-based indexing by convention, so the first element is at index 1. Languages such as Python, Java, and C++ use 0-based indexing, so accessing scores[0] in AQA pseudocode is typically out of bounds.
Files must be closed after use because unclosed files can cause data loss when buffered data is not flushed to disk, or prevent other programs or processes from accessing the file. AQA pseudocode uses CLOSEFILE for this.
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
Object-Oriented Programming
Stacks and Queues
Related lessons
9 min
7 min
5 min
6 min
8 min