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 621–630 of 692
  1. 621
  2. 622
  3. 623
  4. 624
  5. 625
  6. 626
  7. 627
  8. 628
  9. 629
  10. 630

Question 621

Multiple choice Iteration
Which offered initial int value of x makes the final value…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 622

Multiple choice Iteration
What is printed? int number = 893; int score = 0; while (number > 0) { int digit…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 623

Multiple choice Iteration
Which offered initial int value of step makes the body execute exactly three…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 624

Multiple choice Iteration
Both versions start with int x = 0 and int y = 9. Version I uses && as shown. Version II replaces only && with ||.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 625

Multiple choice Iteration
What is printed? int hits = 0; for (int divisor = 2; divisor <= 6; divisor++) { int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 626

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 627

Multiple choice Iteration
For every int n from 0 through 10 inclusive, which replacement leaves total equal to the original…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 628

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 629

Multiple choice Iteration
What is printed? int running = 0; int total = 0; for (int k = 1; k <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 630

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 621 of 692
Page 63 of 70