AP CS A Unit 6 Exam PRACTICE

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Scott Chamberlain
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What return statement may be used in p()?
return 1;
return {1, 2, 3};
return int[]{1, 2, 3};
return new int[3];
return true;
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the following method do?
Returns a count of the number of elements in the array.
Returns the sum of the values in the array.
Returns a count of the number of times x appears in the array.
Returns the average of the values in the array.
Returns a count of the number of positive elements in the array
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following instance variable and method.
Which of the following replacements for /* missing code */ correctly implements the method printEvenIndices()?
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Assume the following method has been defined.
What is output by the following code?
String[] b = {"aardvark", "banana", "cougar", "daikon", "elephant", "fog", "get"};
System.out.println(mystery(b, 5));
0
2
3
4
5
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
When you pass an array to a method, the method receives _______.
a copy of the array
a copy of the first element
a copy of the reference to the first element
a copy of the reference to the array
the length of the array
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the following algorithm do?
Adds 1 to every value in the array.
Doubles all the values in the array.
Changes all the values in the array to even numbers.
Tests if the elements in the array are even or odd.
Doubles every other value in the array.
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following method.
What is printed when the code above is executed?
pro
pprpro
pprogrpro
prprograprog
programprogramprogram
Create a free account and access millions of resources
Similar Resources on Wayground
22 questions
Camp 1_30

Quiz
•
12th Grade
15 questions
Year 12 Programming

Quiz
•
11th - 12th Grade
15 questions
IF and Vlookup Function

Quiz
•
9th - 10th Grade
15 questions
Javascript

Quiz
•
10th - 12th Grade
18 questions
10.2 Arrays Cambridge iAS 9618 - Copy

Quiz
•
11th Grade
19 questions
SHS 9.4 Python

Quiz
•
9th Grade
20 questions
L73_118 Prep for Test

Quiz
•
12th Grade - University
15 questions
Java Arrays and Loops Quiz Review

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade