Verityprep
Question Bank · Unit 2

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.

Subtopic: Boolean Expressions Clear filter

Questions 351–357 of 357
  1. 351
  2. 352
  3. 353
  4. 354
  5. 355
  6. 356
  7. 357

Question 351

Multiple choice Boolean Expressions
What is printed as a result of executing the following code segment? int score = 85; String g = ""; if (score >= 90) g +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 352

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 353

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 354

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 355

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 356

Multiple choice Boolean Expressions
Which expression is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 357

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 351 of 357
Page 36 of 36