logo

Cambridge IGCSE Computer Science practice

Paper 2 structured question: Arrays

Try the question first, then check the answer and practise the same topic again.

At a glance

2

Paper

2

Marks

Topic

Arrays

Exam-style question

Try this first

Paper 2Algorithms, Programming and Logic2 marks

Understanding 2D arrays.

Description

Matrix Representation

Consider the following 2D array: [[1, 2, 3], [4, 5, 6], [7, 8, 9]].

  1. a

    Explain how to access the element in the second row and first column of the array.

    Aim for approximately 2 distinct marking points.

    [2]

0 of 1 part answered

Answer every part before opening the mark scheme.

Concise answer preview

Concise answer

Use array[1][0] to access the element in the second row and first column, which is 4.

Why this is correct

In a 2D array, the first index is the row number (starting from 0), and the second index is the column number.

Complete every part above to unlock the full mark scheme through the existing protected review flow.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

Flashcard 1 of 6

Press Space to flip, arrows to move

Related practice questions