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 301–310 of 376
  1. 301
  2. 302
  3. 303
  4. 304
  5. 305
  6. 306
  7. 307
  8. 308
  9. 309
  10. 310

Question 301

Multiple choice Iteration
Which replacement makes count equal to the number of integer divisions by 2 needed for a positive x to become 0? The original x…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 302

Multiple choice Iteration
Which replacement lets the loop terminate normally with d equal to 0, without throwing…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 303

Multiple choice Iteration
What is printed? Notice the semicolon immediately after the for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 304

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 305

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 306

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 307

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 308

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 309

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 310

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 301 of 376
Page 31 of 38