Oxford AQA International A-level · Computer Science (9645)

Arrays and lists: Practice Questions

5 multiple-choice questions marked as you go, and 5 written questions with worked solutions. All on Arrays and lists.

10 questions27 marksFree, no account
Question 1
1 mark

Which of the following describes a significant disadvantage of using a dynamic list instead of a static array when the total number of elements to be stored is fixed and known at compile time?

Question 2
1 mark

A two-dimensional array \( \text{Grid}[5][10] \) is stored in row-major order in memory. The base address of the array is \( 1000 \) and each integer element occupies \( 4 \) bytes. Using 0-based indexing, what is the memory address of the element located at \( \text{Grid}[2][3] \)?

Question 3
1 mark

When comparing a static array to a dynamic list, which of the following is a characteristic specific to a static array?

Question 4
1 mark

Consider a dynamic list structure implemented using an underlying array. If the list is currently at its maximum capacity, what is the worst-case time complexity for a single append operation?

Question 5
1 mark

When comparing a two-dimensional static array to a list of lists (as implemented in Python), which statement accurately describes their physical storage in memory?

Question 6
3 marks

Explain one reason why a dynamic list might be less memory-efficient than a static array when storing the same number of data items.

Write your answer out first, then check it against the worked solution.

Question 7
6 marks

Describe the sequence of actions that occurs at the memory level when an element is appended to a dynamic array that has reached its maximum current capacity.

Write your answer out first, then check it against the worked solution.

Question 8
3 marks

In a two-dimensional array or a list of lists, describe how a specific element is located by the computer during an access operation.

Write your answer out first, then check it against the worked solution.

Question 9
4 marks

A programmer is working with a one-dimensional static array named Scores containing 6 elements.

(a) Explain the difference between the index of an element and its data content.
(b) Describe the logic required to reverse the elements within the array Scores without using a second array. Identify the role of a temporary variable in this process.

Write your answer out first, then check it against the worked solution.

Question 10
6 marks

A two-dimensional array \( \text{Data}[6][8] \) is stored in column-major order in memory, starting at the base address of \( 5000 \). Each element in the array is a real data type, which occupies \( 8 \) bytes of storage.

(a) Calculate the memory address of the element located at \( \text{Data}[3][5] \). Assume 0-based indexing is used and show your working.
(b) Explain why the calculation for column-major order differs from the calculation for row-major order.

Write your answer out first, then check it against the worked solution.

* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.

You've seen the model answer. Now get yours marked.

This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.

Want more questions like these? Get a fresh set on this topic, graded as you go.

Practice More