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 281–290 of 376
  1. 281
  2. 282
  3. 283
  4. 284
  5. 285
  6. 286
  7. 287
  8. 288
  9. 289
  10. 290

Question 281

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 282

Multiple choice Iteration
Which initialization makes product equal to 24 after the loop? int product =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 283

Multiple choice Iteration
Which offered int value of target causes exactly four body executions? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 284

Multiple choice Iteration
What is printed? for (int row = 1; row <= 3; row++) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 285

Multiple choice Iteration
Which replacement for the inner for header doubles the total number of executions of count++? Keep the outer loop and the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 286

Multiple choice Iteration
For every int n from 0 through 12 inclusive, which expression equals the final value of count? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 287

Multiple choice Iteration
What is the final value of count? int count = 0; for (int row = 1;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 288

Multiple choice Iteration
What is printed? int col = 0; int count = 0; for (int row = 0; row < 4;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 289

Multiple choice Iteration
What is printed? int count = 0; for (int row = 1; row <= 3; row++) { int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 290

Multiple choice Iteration
Which output is produced? for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 281 of 376
Page 29 of 38