Verityprep
Question Bank · Unit 2

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.

Subtopic: Boolean Expressions Clear filter

Questions 311–316 of 316
  1. 311
  2. 312
  3. 313
  4. 314
  5. 315
  6. 316

Question 311

Multiple choice Boolean Expressions
What is printed as a result of executing the following code segment? int x = 5, y = 8; if (x > 3) { if (y < 5) { System.out.print("A"); }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 312

Multiple choice Boolean Expressions
What is printed as a result of executing the following code segment? int n = 4; if (n >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 313

Multiple choice Boolean Expressions
What is printed as a result of executing the following code segment? int a = 7, b = 3; boolean r1 = (a > b) && (a % 2…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 314

Multiple choice Boolean Expressions
What is printed as a result of executing the following code segment? int x = 0; boolean r = (x++…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 315

Multiple choice Boolean Expressions
Which expression is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 316

Multiple choice Boolean Expressions
Which single if statement behaves exactly the same as the nested if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 311 of 316
Page 32 of 32