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 311–320 of 376
  1. 311
  2. 312
  3. 313
  4. 314
  5. 315
  6. 316
  7. 317
  8. 318
  9. 319
  10. 320

Question 311

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 312

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 313

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 314

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 315

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 316

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 317

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 318

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 319

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 320

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 311 of 376
Page 32 of 38