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.

Subtopic: Iteration Clear filter

Questions 291–300 of 383
  1. 291
  2. 292
  3. 293
  4. 294
  5. 295
  6. 296
  7. 297
  8. 298
  9. 299
  10. 300

Question 291

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 292

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 293

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 294

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 295

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 296

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 297

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 298

Multiple choice Iteration
What is printed? The indentation is shown exactly as intended. for (int row = 1; row <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 299

Multiple choice Iteration
Across the entire code segment, how many times is col < 2 evaluated? for (int row =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 300

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 291 of 383
Page 30 of 39