
AP CSA Unit 3

Quiz
•
Computers
•
10th - 12th Grade
•
Medium
Used 34+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does short circuit evaluation mean in the following code?
i) if (a < b && c != d)
if a < b is false it evaluates c != d
if a < b is false it doesn't evaluate c != d
if c != d is false it evaluates a < b
f c != d is false it doesn't evaluate a < b
if a < b is true it doesn't evaluate c != d
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which if statement below tests if the variable letter holds the char value #?
if (letter == #)
if (letter == "#")
if (letter == '#')
if (letter >= '#')
if (letter = '#')
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
int a [] = {2, 6, 8, 10, 12, 14, 16, 18};
int sum = 0;
for (int i = 0; i < a.length; i++) {
if (a[i]%3 == 0)
sum += a[i];
}
System.out.println(sum);
What is output?
20
26
28
36
38
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the following code?
for (int i = 0; i < 5; i++)
System.out.print(i + " ");
0 1 2 3 4 5
0 1 2 3 4
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following would print the numbers, 32 54 76 98?
I. for (int t = 32; t <= 100; t += 22)
System.out.print(t + " ");
II. int t = 10;
while (t < 90) {
t += 22;
System.out.print(t + " ");
}
III. int t = 32;
while (t < 100) {
t += 22;
System.out.print(t + " ");
I only
II only
III only
I and II only
I, II, and III
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assume that x and y are boolean variables and have been properly initialized.
(x && y) && !(x || y)
Which of the following best describes the result of evaluating the expression above?
Always true
Always False
true only when x is true and y is true
true only when x and y have the same value
true only when x and y have different values
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following boolean statement:
!( x > y && w == z )
Which of the following will produce the same result?
x <= y && w == z
x >= y || w != z
x <= y || w != z
x <= y && w != z
x < y && w != z
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
STATIC KEYWORD IN JAVA

Quiz
•
9th - 12th Grade
15 questions
Microbit (python)

Quiz
•
8th - 10th Grade
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops

Quiz
•
9th Grade - University
15 questions
Intro to Java Loops

Quiz
•
9th - 12th Grade
15 questions
Java Basic Data Structures

Quiz
•
6th - 10th Grade
15 questions
Python Basics

Quiz
•
KG - University
16 questions
CSA Unit 3 Review

Quiz
•
10th - 12th Grade
20 questions
Java, part I

Quiz
•
11th Grade - University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Chaffey

Quiz
•
9th - 12th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
18 questions
Characteristics of Living Things

Quiz
•
9th - 10th Grade
12 questions
Macromolecules

Lesson
•
9th - 12th Grade