AP CSA Exam 8 Review

AP CSA Exam 8 Review

10th Grade - University

•

20 Qs

quiz-placeholder

Similar activities

ICT Unit-2

ICT Unit-2

University

•

20 Qs

Coding Quiz

Coding Quiz

6th - 10th Grade

•

15 Qs

Kuis Pemrograman Dasar

Kuis Pemrograman Dasar

University

•

20 Qs

Mobile app development principles

Mobile app development principles

10th Grade

•

17 Qs

PROPERTIES

PROPERTIES

8th - 10th Grade

•

16 Qs

Asesment technopreneur dkv

Asesment technopreneur dkv

10th Grade

•

20 Qs

Security and Ethics

Security and Ethics

9th - 12th Grade

•

17 Qs

CIA Mid-Term Review 1

CIA Mid-Term Review 1

9th - 10th Grade

•

17 Qs

AP CSA Exam 8 Review

AP CSA Exam 8 Review

Assessment

Quiz

•

Computers

•

10th Grade - University

•

Medium

Created by

Caitlyn Choe

Used 14+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Consider the following method:

Assume that the array test has been declared and initialized as follows.

int[] test = {1, 3, 2, 5, 8, 7, 0};

What value will be returned as a result of the call mystery(test)?

4

6

11

13

26

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Consider the following code segment.

int[][] matrix = new int[7][15];

Which of the following correctly gives the number of columns in the two-dimensional array matrix?

matrix[0]

matrix.length

matrix[matrix.length - 1 ]

matrix[0].length

matrix.length[0]

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

3. Consider the following declaration for a two-dimensional array.

What element is displayed when the following line of code is executed?

System.out.println(grid[2][1]);

6

7

10

11

12

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Consider the following method intended to swap the first and last rows in a two-dimensional array:

Which of the following correctly replaces / missing code */?

Media Image
Media Image
Media Image
Media Image

none of the above

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Consider the following method declaration.

Assume the 2D array, matrix, has been initialized to the following values:

4 6 -15

5 11 21

-11 -10 3

4 -10 -18

-21 14 -23

What is the value of matrix after the method call, increment(matrix); ?

4 6 -15

5 11 21

-11 -10 3

4 -10 -18

-21 14 -23

5 7 -15

6 12 22

-11 -10 4

5 -10 -18

-21 15 -23

5 7 -14

6 12 22

-10 -9 4

5 -9 -17

-20 15 -22

4 6 -16

5 11 21

-12 -11 3

4 -11 -19

-22 14 -24

5 7 -16

6 12 22

-12 -11 4

5 -11 -19

-22 15 -24

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

The following code is meant to find the smallest value in a 2-d array.

What should m be set to in order for the code to work as intended?

1000

0

-100000

Double.MIN_VALUE

Double.MAX_VALUE

7.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Consider the following code.

int[][] matrix = new int[4][5];

Suppose we want to initialize matrix to the following rows and columns.

0 1 2 3 4

4 3 2 1 0

0 1 2 3 4

4 3 2 1 0

Which of the options below correctly initializes matrix? (Choose all that apply)

Media Image
Media Image
Media Image

Create a free account and access millions of resources

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?

Discover more resources for Computers