Search Header Logo

AP CSA 2D Arrays (8.2)

Authored by Herman Galioulline

Computers

10th - 12th Grade

Used 36+ times

AP CSA 2D Arrays (8.2)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

As a result of executing the code segment, how many elements in the two-dimensional (2D) array multi will store the value 9?

0

1

2

4

6

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What, if anything, is printed as a result of executing the code segment?

Media Image
Media Image
Media Image

Nothing is printed, because an ArrayIndexOutOfBoundsException is thrown.

Nothing is printed, because it is not possible to use an enhanced for loop on a two-dimensional array.

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

As a result of executing the code segment, how many times are "Condition one" and "Condition two" printed?

"Condition one" is printed twice, and "Condition two" is printed twice.

"Condition one" is printed twice, and "Condition two" is printed once.

"Condition one" is printed once, and "Condition two" is printed twice.

"Condition one" is printed once, and "Condition two" is printed once.

"Condition one" is never printed, and "Condition two" is printed once.

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

2

3

4

5

6

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

{{0, 1}, {2, 3}}

{{10, -18}, {48, 17}}

{{-5, 2, 0}, {4, 11, 0}}

{{4, 1, 7}, {-10, -11, -12}}

{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Consider the following code segment, where num is a properly declared and initialized integer variable. The following code segment is intended to set foundRow and foundCol to the row and column indexes of an array element containing num. The code segment does not work as intended.

Which of the following values for num can be used as a test case to show that the code segment does not work as intended?

12

15

24

41

43

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?