Test your understanding
0 / 5 answered
Q1. What does a two-dimensional array store?
A. Only one value
B. Values in rows and columns
C. Different data types in one element
D. Only characters
Check answer
Q2. What is the first element of int arr[3][4]?
A. arr[1][1]
B. arr[0][1]
C. arr[0][0]
D. arr[3][4]
Check answer
Q3. How many elements are present in int arr[3][4]?
A. 7
B. 12
C. 16
D. 9
Check answer
Q4. Which loop controls the rows in the usual nested-loop approach?
A. Inner loop
B. Outer loop
C. Both always control columns
D. Neither
Check answer
Q5. What does arr[1][2] represent?
A. First row, second column
B. Second row, third column
C. Third row, second column
D. Second row, second column
Check answer
Reset knowledge check
In this lesson, we learned: