
AP CSA Exam 8 Review
Quiz
•
Computers
•
10th Grade - University
•
Medium
Caitlyn Choe
Used 14+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
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
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
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 */?
none of the above
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
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
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)
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
16 questions
Pixlr E Review
Quiz
•
10th Grade
19 questions
UNIT 1.2 MEMORY
Quiz
•
10th Grade
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
18 questions
Memory-Mobo-Hard/Software
Quiz
•
University
20 questions
PARC Linux Basic Part 2
Quiz
•
University
18 questions
SQL Quiz
Quiz
•
University
15 questions
Jira
Quiz
•
University
21 questions
Visual Basic Assessment
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
