AP® Computer Science A Selection and Iteration Multiple Choice Questions
Work through AP Computer Science A multiple-choice questions on Selection and Iteration, then check each answer against a worked solution.
Free · no sign-up Open questions need no account. Sign up or log in to open the rest.
Multiple choice
Iteration
Question 422
Multiple choice
Iteration
Question 423
Multiple choice
Boolean Expressions
Consider the following code segment.
boolean a = true;
boolean b = false;
boolean c = true;
boolean value = !(a && b) && (b || c) && !(a && !c);
What value is stored in value?
Pick an answer, then check it. The solution opens in a window.
CCorrect answer
Main Solution
Answer
Answer: C. !(a && b) is true, (b || c) is true, and !(a && !c) is also true because !c is false.
Answer: Correct: C
A
false, because a && b is false
B
false, because b is false
C
true
D
false, because a is true
Answer images
Question 424
Multiple choice
Iteration
Question 425
Multiple choice
Iteration
Question 426
Multiple choice
Iteration
Question 427
Multiple choice
Iteration
Question 428
Multiple choice
Boolean Expressions
Question 429
Multiple choice
Boolean Expressions
Question 421 of 692
Page 43 of 70
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.

