
AP Comp Sci A MidTerm Review
Authored by Laura Frauenberg
Other
9th - 12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following variable declarations and initializations.
int a = 2;
int b = 6;
int c = 3;
Which of the following expressions evaluates to false ?
a < b == c < b
a > b == b < c
a < b != b < c
a < b != c < b
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
boolean a = true;
boolean b = false;
System.out.print((a == !b) != false);
What is printed as a result of executing this code segment?
false
true
0
1
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following expression.
(3 + 4 == 5) != (3 + 4 >= 5)
What value, if any, does the expression evaluate to?
true
false
5
7
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
int m = 8;
int n = 3;
if (m + n > 10)
{
System.out.print(m + n);
}
if (m - n > 0)
{
System.out.print(m - n);
}
What, if anything, is printed as a result of executing the code segment?
nothing is printed
115
11
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
boolean a = true;
boolean b = true;
System.out.print((b || (!a || b)) + " ");
System.out.print(((!b || !a) && a) + " ");
System.out.println(!(a && b) && b);
What output is produced when this code segment is executed?
true true true
true false true
true false false
false true false
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following expression, j, k, and m are properly declared and initialized int variables.
!((j == k) && (k > m))
Which of the following is equivalent to the expression above?
(j != k) || (k < m)
(j != k) || (k <= m)
(j == k) || (k < m)
(j != k) && (k <= m)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following expression, sunny and windy are properly declared and initialized boolean variables.
!sunny && !windy
Which of the following is equivalent to the expression above?
sunny || windy
!sunny || !windy
!(sunny || windy)
!(sunny && windy)
Access all questions and much more by creating a free account
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
25 questions
2D Motion
Quiz
•
9th - 12th Grade
20 questions
Đồ thị hàm số y=ax^2
Quiz
•
9th Grade
20 questions
Maritime NCCER 00100
Quiz
•
9th - 12th Grade
20 questions
Floral Tools Quiz
Quiz
•
9th - 12th Grade
20 questions
Business Professionalism
Quiz
•
11th - 12th Grade
20 questions
UAS SPREADSHEET X AKUNTANSI
Quiz
•
10th Grade
20 questions
Haloween :0
Quiz
•
KG - Professional Dev...
20 questions
Motion graphs
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Other
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
15 questions
Making Inferences
Quiz
•
7th - 12th Grade
18 questions
SAT Prep: Ratios, Proportions, & Percents
Quiz
•
9th - 10th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
12 questions
Exponential Growth and Decay
Quiz
•
9th Grade