8.2

Data structures

Cambridge IGCSE Computer Science (0478)  · Unit 8: Programming  · 9 flashcards

Data structures is topic 8.2 in the Cambridge IGCSE Computer Science (0478) syllabus , positioned in Unit 8 — Programming , alongside Programming concepts and Procedures and functions.  In one line: A 1D array is a linear data structure that stores a collection of elements of the same data type under a single variable name, accessed via an index.

This topic is examined in Paper 1 (computer systems theory) and Paper 2 (algorithms, programming and logic).

The deck below contains 9 flashcards — 3 definitions, 4 key concepts and 2 application cards — covering the precise wording mark schemes reward.  Use the 3 definition cards to lock down command-word answers (define, state), then move on to the concept and application cards to handle explain, describe and compare questions.

Key definition

A 1D array and provide an example of its use

A 1D array is a linear data structure that stores a collection of elements of the same data type under a single variable name, accessed via an index.

Example: `names = ['Alice', 'Bob', 'Charlie']` stores three names.

What the Cambridge 0478 syllabus says

Official 2026-2028 spec

These are the exact learning objectives Cambridge sets for this topic. Match the command word (Describe, Explain, State, etc.) in your answer to score full marks.

  1. Declare Declare and use one-dimensional (1D) and two-dimensional (2D) arrays
  2. Understand Understand the use of arrays including variables as indexes
  3. Write Write values into and read values from an array using iteration including nested iteration
Definition Flip

Define a 1D array and provide an example of its use.

Answer Flip

A 1D array is a linear data structure that stores a collection of elements of the same data type under a single variable name, accessed via an index.

Example: `names = ['Alice', 'Bob', 'Charlie']` stores three names.
Key Concept Flip

Explain the difference between a 1D and a 2D array, providing a real-world example for each.

Answer Flip

A 1D array is a single row of elements, like a list. A 2D array is a table of rows and columns, like a spreadsheet. Example 1D: days of the week. Example 2D: seating arrangement in a cinema.

Definition Flip

What is a 'record' in the context of data structures? Give an example.

Answer Flip

A record is a collection of fields, possibly of different data types, treated as a single unit.

Example: A student record might contain name (string), age (integer), and grade (character).
Definition Flip

Describe the purpose of a 'file' in computer science, and outline two common file types.

Answer Flip

A file is a named location on storage that holds data or information. Two common file types are text files (

Example: `.txt`) and binary files (. `.jpg`).
Key Concept Flip

Explain the difference between 'read', 'write', and 'append' operations when working with files.

Answer Flip

'Read' retrieves data from a file. 'Write' overwrites existing data or creates a new file. 'Append' adds data to the end of an existing file.

Key Concept Flip

Explain the significance of the 'open' and 'close' operations when working with files.

Answer Flip

'Open' prepares a file for reading or writing, establishing a connection between the program and the file. 'Close' terminates this connection, releasing resources and ensuring data is saved.

Key Concept Flip

Give an example scenario where using a 2D array would be more appropriate than using a 1D array. Explain why.

Answer Flip

Storing the scores of students in multiple subjects. A 2D array allows easy access to a specific student's score in a specific subject using row (student) and column (subject) indices, which isn't directly possible in a 1D array.

Key Concept Flip

Describe how to access the element in the 2nd row and 3rd column of a 2D array named 'data' using typical array indexing.

Answer Flip

Assuming the array is indexed starting from 0, the element in the 2nd row and 3rd column would be accessed as `data[1][2]`.

Key Concept Flip

Explain why efficient file handling (opening and closing files correctly) is crucial in programming.

Answer Flip

Correct file handling prevents data loss, corruption, and resource leaks. Failing to close a file can leave it open and inaccessible to other programs and might cause the data being written to not be fully saved.

Review the material

Read revision notes with definitions, equations, and exam tips.

Read Notes

Test yourself

Practice with MCQ questions to check your understanding.

Take Computer Science Quiz
8.1 Programming concepts 8.3 Procedures and functions

Key Questions: Data structures

Define a 1D array and provide an example of its use.

A 1D array is a linear data structure that stores a collection of elements of the same data type under a single variable name, accessed via an index.

Example: `names = ['Alice', 'Bob', 'Charlie']` stores three names.
What is a 'record' in the context of data structures? Give an example.

A record is a collection of fields, possibly of different data types, treated as a single unit.

Example: A student record might contain name (string), age (integer), and grade (character).
Describe the purpose of a 'file' in computer science, and outline two common file types.

A file is a named location on storage that holds data or information. Two common file types are text files (

Example: `.txt`) and binary files (. `.jpg`).

More topics in Unit 8 — Programming

Data structures sits alongside these Computer Science decks in the same syllabus unit. Each uses the same spaced-repetition system, so progress in one informs the next.

Cambridge syllabus keywords to use in your answers

These are the official Cambridge 0478 terms tagged to this section. Mark schemes credit responses that use the exact term — weave them into your answers verbatim rather than paraphrasing.

array 1D array 2D array record file read write append open close

Key terms covered in this Data structures deck

Every term below is defined in the flashcards above. Use the list as a quick recall test before your exam — if you can't define one of these in your own words, flip back to that card.

A 1D array and provide an example of its use
'record' in the context of data structures? Give an example
Describe the purpose of a 'file' in computer science, and outline two common file types

How to study this Data structures deck

Start in Study Mode, attempt each card before flipping, then rate Hard, Okay or Easy. Cards you rate Hard come back within a day; cards you rate Easy push out to weeks. Your progress is saved in your browser, so come back daily for 5–10 minute reviews until every card reads Mastered.