AP CS A Unit 6 Exam PRACTICE

AP CS A Unit 6 Exam PRACTICE

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

หน่วยที่2การสร้างมูลค่าเพิ่มให้ผลิตภัณฑ์หรือบริการ

หน่วยที่2การสร้างมูลค่าเพิ่มให้ผลิตภัณฑ์หรือบริการ

11th Grade - University

15 Qs

Traffic Light Project Quiz

Traffic Light Project Quiz

9th Grade

17 Qs

CSS - Computer Systems Services

CSS - Computer Systems Services

12th Grade

20 Qs

Yr7- Understanding computers Lessons 1-3

Yr7- Understanding computers Lessons 1-3

7th - 11th Grade

20 Qs

Hardware and Components

Hardware and Components

5th - 11th Grade

19 Qs

Vocabulary of Computer

Vocabulary of Computer

12th Grade

15 Qs

Networking Quiz

Networking Quiz

8th - 9th Grade

15 Qs

Asesmen Sumatif

Asesmen Sumatif

12th Grade

15 Qs

AP CS A Unit 6 Exam PRACTICE

AP CS A Unit 6 Exam PRACTICE

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Scott Chamberlain

Used 9+ 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

2 mins • 1 pt

Media Image

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

Media Image

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

Media Image

Consider the following instance variable and method.

Which of the following replacements for /* missing code */ correctly implements the method printEvenIndices()?

Media Image
Media Image
Media Image
Media Image
Media Image

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

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

Media Image

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

Media Image

Consider the following method.

What is printed when the code above is executed?

pro

pprpro

pprogrpro

prprograprog

programprogramprogram

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?