Skip to main content

Back to the full dot-point answer

Northern IrelandSoftware Systems DevelopmentQuick questions

AS 1 Introduction to Object Oriented Development

Quick questions on Arrays and data structures: one and two dimensional arrays - CCEA A-Level Software Systems Development

5short Q&A pairs drawn directly from our worked dot-point answer. For full context and worked exam questions, read the parent dot-point page.

What are one-dimensional arrays?
Show answer
The array name plus an index selects one element: scores[2] is the third element. The size is fixed when the array is created, and an index outside the valid range causes an out-of-bounds error.
What are off-by-one on bounds?
Show answer
A size-10 array has indices 0 to 9. Looping for i = 0 to 10 or for i = 1 to 10 over a zero-based array reads or writes out of bounds and crashes. Loop to length - 1.
What is q1?
Show answer
State the range of valid indices for an array declared with size 8, assuming zero-based indexing. [1 mark]
What is q2?
Show answer
Write a loop to add 1 to every element of an integer array counts of length n. [3 marks]
What is q3?
Show answer
Give one advantage of a single two-dimensional array over many one-dimensional arrays for storing a grid of data. [2 marks]

Have a question we have not covered?

This dot-point answer is short enough that we have not extracted many short questions yet. Read the full dot-point answer or ask Mo, our study assistant, in the chat for follow ups.

All Software Systems DevelopmentQ&A pages