AP Computer Science Amediummcq1 pt

Given int[][] a = {{1, 2}, {3, 4}}, the sum of all elements is

A.10
B.8
C.6
D.24

Explanation

Core Concept

1 + 2 + 3 + 4 equals 10.

Correct Answer

A10

More Unit 8: 2D Array practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 8: 2D Array Questions →