OCR GCSE Computer Science Paper 2 Practice 2026 - Free Practice Questions and Study Guide

Question: 1 / 400

Which data structure allows data to be stored and defined under one variable name?

List

Array

The correct choice refers to an array, which is a data structure that allows multiple items of the same type to be stored under a single variable name. An array consists of a collection of elements, each identified by an index or key. This makes it easy to manage groups of related data effectively, as it can be manipulated as a single unit while allowing individual access to elements within the array using their respective indices.

Arrays are particularly useful in scenarios where you need to handle a fixed-size collection of data elements, allowing for efficient data storage and retrieval. They provide the efficiency of accessing elements in constant time due to their index-based structure. In many programming languages, arrays must be of a fixed size when defined, which distinguishes them from more flexible data structures.

In contrast, other options such as lists, stacks, and tuples may exhibit different characteristics or structures. For instance, lists in some languages can vary in size, stacks follow a last-in, first-out (LIFO) order, and tuples are often immutable collections that cannot be changed after they are defined. This underscores the specific role that arrays play in data management within programming.

Get further explanation with Examzify DeepDiveBeta

Stack

Tuple

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy