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.

Host this setFree Play

The 20 questions

  1. Which mathematical concept is best represented using a one-dimensional array?

    • Graph
    • Tuple
    • Matrix
    • Vector
  2. A one-dimensional array is a useful way to represent which mathematical object?

    • A graph
    • A binary tree
    • A vector
    • A hash function
  3. A two-dimensional array is a useful way to represent which mathematical object?

    • A queue
    • A dictionary
    • A stack
    • A matrix
  4. An array is declared with indexes 0 to 9. How many elements does it hold?

    • 10
    • 9
    • 0
    • 11
  5. A 3 by 4 array has 3 rows and 4 columns. How many elements does it hold?

    • 12
    • 3
    • 7
    • 34
  6. 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
  7. An array scores holds the values 4, 7, 2 and 9 at indexes 0 to 3. What is scores[2]?

    • 9
    • 4
    • 7
    • 2
  8. 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
  9. A loop sums all 10 elements of a one-dimensional array. How many additions does it perform?

    • 1
    • 9
    • 10
    • 11
  10. 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
  11. 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
  12. 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
  13. 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]
  14. Which mathematical structure is best represented by a two-dimensional array?

    • Tree
    • Queue
    • Vector
    • Matrix
  15. 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
  16. 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
  17. What main advantage does direct index access provide for array elements?

    • Automatic data sorting
    • Unlimited memory capacity
    • Constant time access
    • Dynamic auto-resizing
  18. Which built-in structure in many high-level programming languages acts as an array equivalent?

    • Dictionary
    • Record
    • List
    • File
  19. What happens if an array index is outside its defined bounds?

    • Run-time error
    • Logical reset
    • Automatic resize
    • Syntax error
  20. 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]

All AQA Computer Science quizzes