AP® Computer Science A Selection and Iteration Practice Questions
Work through AP Computer Science A practice 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 362
Multiple choice
Iteration
Question 363
Multiple choice
Boolean Expressions
Question 364
Multiple choice
Iteration
Question 365
Multiple choice
Iteration
Question 366
Multiple choice
Boolean Expressions
Question 367
Multiple choice
Iteration
Question 368
Multiple choice
Iteration
Question 369
Free response
Iteration
Question 370
Multiple choice
Boolean Expressions
What is printed?
int x = 4, y = 10, z = 4;
boolean a = !(x > y) && !(z == x);
boolean b = (x < y) || (z > x);
boolean c = !(x == z || y < x);
System.out.println(a + " " + b + " " + c);
Pick an answer, then check it. The solution opens in a window.
ACorrect answer
Main Solution
Solution:
Correct: A. a = !(4>10) && !(4==4) = true && false = false. b = (4<10) || (4>4) = true || false = true. c = !(4==4 || 10<4) = !(true || false) = false. Output: false true false.
Answer: Correct: A
Answer images
Question 361 of 740
Page 37 of 74
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.

