AP Computer Science Amediummcq1 pt

The sum of int[] a = {1, 2, 3} computed by an enhanced for loop is

A.6
B.5
C.3
D.0

Explanation

Core Concept

1 + 2 + 3 equals 6.

Correct Answer

A6

More Unit 6: Array practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 6: Array Questions →