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 571–580 of 692
  1. 571
  2. 572
  3. 573
  4. 574
  5. 575
  6. 576
  7. 577
  8. 578
  9. 579
  10. 580

Question 571

Multiple choice Boolean Expressions
The boolean variables p, q and r may have any values. Which list contains all and only the possible complete outputs? Semicolons in the choices separate…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 572

Multiple choice Iteration
What is printed? for (int i = 2; i <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 573

Multiple choice Iteration
What is printed? int n = 5; while (n…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 574

Multiple choice Iteration
What is printed? int x = 8; int count = 0; while (x <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 575

Multiple choice Iteration
How many times is i <= 6 evaluated, and how many times does the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 576

Multiple choice Iteration
What is printed? int i; for (i = 2; i <= 7; i +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 577

Multiple choice Iteration
What is printed? int total = 0; for (int i = 1; i <= 6; i++)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 578

Multiple choice Iteration
Each version starts with int n = 3 and int total = 0. What are the final totals for Version I and Version II,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 579

Multiple choice Iteration
The int n is from 0 through 10 inclusive. Which replacement makes total equal to the sum of all integers from 1…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 580

Multiple choice Iteration
Which offered int value of n causes the body to execute exactly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 571 of 692
Page 58 of 70