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.

Questions 661–670 of 692
  1. 661
  2. 662
  3. 663
  4. 664
  5. 665
  6. 666
  7. 667
  8. 668
  9. 669
  10. 670

Question 661

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 662

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 663

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 664

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 665

Multiple choice Boolean Expressions
Which expression is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 666

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 667

Multiple choice Iteration
What is printed as a result of executing the following code segment? int c = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 668

Multiple choice Iteration
What is printed as a result of executing the following code segment? int total = 0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 669

Multiple choice Iteration
What is printed as a result of executing the following code segment? int n =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 670

Multiple choice Iteration
What is printed as a result of executing the following code segment? int n = 1230;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 661 of 692
Page 67 of 70