Exam-style question
Try this first
Understanding 2D arrays.
Description
Matrix Representation
Consider the following 2D array: [[1, 2, 3], [4, 5, 6], [7, 8, 9]].
- a[2]
Explain how to access the element in the second row and first column of the array.
Aim for approximately 2 distinct marking points.
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.
