Lesson 4.2.1.2
4.2.1.2 Single- and multi-dimensional arrays Quiz: AQA Computer Science, Unit 2
20 questions
In partnership with Revision Ninja
Lesson 4.2.1.2, Single- and multi-dimensional arrays: 20 multiple choice questions for the AQA Computer Science (7517), Unit 2: Fundamentals of data structures, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
Which mathematical concept is best represented using a one-dimensional array?
- Graph
- Tuple
- Matrix
- Vector
-
A one-dimensional array is a useful way to represent which mathematical object?
- A graph
- A binary tree
- A vector
- A hash function
-
A two-dimensional array is a useful way to represent which mathematical object?
- A queue
- A dictionary
- A stack
- A matrix
-
An array is declared with indexes 0 to 9. How many elements does it hold?
- 10
- 9
- 0
- 11
-
A 3 by 4 array has 3 rows and 4 columns. How many elements does it hold?
- 12
- 3
- 7
- 34
-
What does an n-dimensional array require to access a specific element?
- Tuple of n integers
- Single integer pointer
- Single floating-point value
- List of strings
-
An array scores holds the values 4, 7, 2 and 9 at indexes 0 to 3. What is scores[2]?
- 9
- 4
- 7
- 2
-
A 2D array grid has rows 0 to 2 and columns 0 to 3. What is the value of grid[1][2] if row 1 is 5, 6, 7, 8?
- 6
- 5
- 7
- 8
-
A loop sums all 10 elements of a one-dimensional array. How many additions does it perform?
- 1
- 9
- 10
- 11
-
An array holds the values 3, 8 and 5 at indexes 0 to 2. What is the largest value in the array?
- 5
- 3
- 8
- 16
-
Why must all elements in a standard static array share the same data type?
- Fixed element size
- Dynamic memory allocation
- Variable address offsets
- Faster file saving
-
A program uses a one-dimensional array to store the 12 months' sales figures. Which index is used for January if indexing starts at 0?
- 11
- 0
- 1
- 12
-
A 2D array representing a 5 by 5 board needs what index to reach the centre cell if indexing starts at 0?
- [1][1]
- [4][4]
- [5][5]
- [2][2]
-
Which mathematical structure is best represented by a two-dimensional array?
- Tree
- Queue
- Vector
- Matrix
-
In a 5 by 6 timetable array of days and periods, what does one element represent?
- An entire period
- One lesson slot
- One full day
- A whole week
-
A one-dimensional array of 100 elements is used where indexes run 0 to 99. What is the index of the last element?
- 99
- 100
- 1
- 98
-
What main advantage does direct index access provide for array elements?
- Automatic data sorting
- Unlimited memory capacity
- Constant time access
- Dynamic auto-resizing
-
Which built-in structure in many high-level programming languages acts as an array equivalent?
- Dictionary
- Record
- List
- File
-
What happens if an array index is outside its defined bounds?
- Run-time error
- Logical reset
- Automatic resize
- Syntax error
-
A program stores a 3 by 3 grid in a two-dimensional array indexed from 0. Which index pair locates the middle value?
- [1][1]
- [0][1]
- [2][2]
- [3][3]
Related quizzes
- Data structures and abstract data types Quiz · 4.2.1.1 · 20 questions
- Reading and writing text and binary files Quiz · 4.2.1.3 · 20 questions
- Linear, circular and priority queues Quiz · 4.2.2.1 · 20 questions
- Stack operations Quiz · 4.2.3.1 · 20 questions
- Graphs: weighted, directed and adjacency representations Quiz · 4.2.4.1 · 20 questions
- Trees and binary trees Quiz · 4.2.5.1 · 20 questions
- Hash tables, hashing and collisions Quiz · 4.2.6.1 · 20 questions
- Dictionaries and key-value pairs Quiz · 4.2.7.1 · 20 questions
- Vectors and vector operations Quiz · 4.2.8.1 · 20 questions
- Data types Quiz · 4.1.1.1 · 20 questions