logo

Cambridge IGCSE Computer Science practice

How do you declare a two-dimensional array in most programming languages?

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

At a glance

MCQ

Type

cambridge_mcq

Style

Topic

Arrays

Exam-style question

Try this first

How do you declare a two-dimensional array in most programming languages?.

  1. A.type array[size];
  2. B.type array[size1][size2];
  3. C.array[size1][size2] type;
  4. D.array[size] type;

Answer and explanation

Concise answer

type array[size1][size2];

Why this is correct

This syntax specifies the type and dimensions of the 2D array.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

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