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: Iteration Clear filter

Questions 321–330 of 376
  1. 321
  2. 322
  3. 323
  4. 324
  5. 325
  6. 326
  7. 327
  8. 328
  9. 329
  10. 330

Question 321

Multiple choice Iteration
The ints low and high satisfy 1 <= low <= high <= 8. Which replacement makes found true exactly when at least one multiple…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 322

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 323

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 324

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 325

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 326

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 327

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 328

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 329

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 330

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 321 of 376
Page 33 of 38