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

3

Marks

Topic

Arrays

Exam-style question

Try this first

Paper 2Algorithms, Programming and Logic3 marks

Nested iteration example.

Description

Multi-dimensional Array Access

You have a 2D array representing a grid of numbers. Describe how you would iterate through this array to print each number.

  1. a

    Explain How would you use nested iteration to access each element?

    Aim for approximately 3 distinct marking points.

    [3]

0 of 1 part answered

Answer every part before opening the mark scheme.

Concise answer preview

Concise answer

You would use an outer loop for rows and an inner loop for columns to access each element.

Why this is correct

Nested loops allow you to access each element in a 2D array by iterating through both dimensions.

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