AP CSA 2D Arrays (8.2)

AP CSA 2D Arrays (8.2)

10th - 12th Grade

6 Qs

quiz-placeholder

Similar activities

MIL March 8, 2023

MIL March 8, 2023

12th Grade

10 Qs

What would you do if...

What would you do if...

1st - 12th Grade

10 Qs

CODE: MAZE INTRO

CODE: MAZE INTRO

7th - 10th Grade

10 Qs

Input and Output Python

Input and Output Python

10th Grade

10 Qs

Access - Lesson 14

Access - Lesson 14

9th - 12th Grade

10 Qs

ICT 10 : Introduction to Adobe Illustrator(CS5)

ICT 10 : Introduction to Adobe Illustrator(CS5)

10th Grade

10 Qs

Hour of Code

Hour of Code

2nd - 12th Grade

10 Qs

Know thy Peer-to-Peer

Know thy Peer-to-Peer

12th Grade

10 Qs

AP CSA 2D Arrays (8.2)

AP CSA 2D Arrays (8.2)

Assessment

Quiz

Computers

10th - 12th Grade

Practice Problem

Hard

Created by

Herman Galioulline

Used 29+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Discover more resources for Computers