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 581–590 of 692
  1. 581
  2. 582
  3. 583
  4. 584
  5. 585
  6. 586
  7. 587
  8. 588
  9. 589
  10. 590

Question 581

Multiple choice Iteration
What is printed? int remaining = 17; int rounds = 0; while (remaining > 0) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 582

Multiple choice Iteration
What is printed? int count = 0; int i; for (i = 1; i < 10;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 583

Multiple choice Iteration
The int n is from 0 through 12 inclusive. Which expression always equals n immediately before every evaluation of i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 584

Multiple choice Iteration
Each version begins with value = 3, where value is an int. Which offered int limit makes Version II execute its body exactly one…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 585

Multiple choice Iteration
Which offered initial value of the int n makes the loop execute exactly three…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 586

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 587

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 588

Multiple choice Iteration
What is printed? int a = 2; int b = 9; for (int i = 0; i < 2; i++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 589

Multiple choice Iteration
Each version is placed inside the displayed loop with count initially 0. What are the final counts for Version I and Version II, respectively? for (int i = 1; i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 590

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 581 of 692
Page 59 of 70