Verityprep
Question Bank · Unit 2

AP® Computer Science A Selection and Iteration Practice Questions

Work through AP Computer Science A practice 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 661–670 of 740
  1. 661
  2. 662
  3. 663
  4. 664
  5. 665
  6. 666
  7. 667
  8. 668
  9. 669
  10. 670

Question 661

Multiple choice Iteration
What is printed? int row = 1; int col = 0; boolean found = false; while (row <= 4 && !found) { col = 1; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 662

Multiple choice Iteration
What is printed? int value = 17; for (int round = 0; round <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 663

Multiple choice Iteration
What is printed? int n = 19; int total = 0; while (n…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 664

Multiple choice Iteration
What is printed? int value = 20; for (int divisor = 2; divisor…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 665

Multiple choice Iteration
What is printed? boolean add = true; int score = 0; for (int i = 1; i <= 4; i++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 666

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 667

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 668

Multiple choice Iteration
What is printed? double a = 0; double b = 0; for (int k = 1; k <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 669

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 670

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 661 of 740
Page 67 of 74