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 631–640 of 692
  1. 631
  2. 632
  3. 633
  4. 634
  5. 635
  6. 636
  7. 637
  8. 638
  9. 639
  10. 640

Question 631

Multiple choice Iteration
What is printed? int balance = 7; int fee = 1; while (balance >= fee) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 632

Multiple choice Iteration
What is printed? int x = 7; int total = 0; while (x > 3) { total += x;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 633

Multiple choice Iteration
Which offered int value of stop makes the final code equal to 120? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 634

Multiple choice Iteration
For every int n from 0 through 8 inclusive, total should equal 1*2 + 2*3 + ... + n*(n+1), with result 0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 635

Multiple choice Iteration
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { int product = 1; for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 636

Multiple choice Iteration
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 637

Multiple choice Iteration
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { int x = row; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 638

Multiple choice Iteration
For every int n from 0 through 8 inclusive, which statement in the replacement loop preserves the final total? Each version starts with total = 0. // Original…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 639

Multiple choice Iteration
For every int n from 1 through 8 inclusive, which expression equals the final count? int count = 0; for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 640

Multiple choice Iteration
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { for (int col = 1; col <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 631 of 692
Page 64 of 70