AP CSA Unit 3

AP CSA Unit 3

Assessment

Flashcard

Computers

10th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

34 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What does short circuit evaluation mean in the following code? if (a < b && c != d)

Back

if a < b is false it doesn't evaluate c != d

2.

FLASHCARD QUESTION

Front

Which if statement below tests if the variable letter holds the char value #? Options: if (letter == #), if (letter == "#"), if (letter == '#'), if (letter >= '#'), if (letter = '#')

Back

if (letter == '#')

3.

FLASHCARD QUESTION

Front

What is 0 0 1 1 1 0 0 0 in base ten?

Back

56

4.

FLASHCARD QUESTION

Front

What is 67 in binary?

Back

0 1 0 0 0 0 1 1

5.

FLASHCARD QUESTION

Front

Consider the following code:
String w = "Rapunzel";
for (int i = 0; i < w.length(); i++) {
System.out.print(w.charAt(i) + " ");
if (i%4 == 3)
System.out.println();
}
What is output?

Back

R a p u
n z e l

6.

FLASHCARD QUESTION

Front

What does the String method substring() do?

Back

Returns a portion of the String.

7.

FLASHCARD QUESTION

Front

What does the following code do?
String w3 = "aardvark";
System.out.println(w3.charAt(w3.length() – 2));

Back

Prints the second to last letter in the String.

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?