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 351–360 of 383
  1. 351
  2. 352
  3. 353
  4. 354
  5. 355
  6. 356
  7. 357
  8. 358
  9. 359
  10. 360

Question 351

Multiple choice Iteration
What happens when this code executes? int x = 3;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 352

Multiple choice Iteration
Each version begins with int x = 2 and int y = 1. For every int n from 0 through 8 inclusive, which replacement body preserves both…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 353

Multiple choice Iteration
For every int n from 0 through 6 inclusive, which statement in the replacement loop preserves the final total? Each version starts with total = 0. // Original…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 354

Multiple choice Iteration
What is printed as a result of executing the following code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 355

Multiple choice Iteration
What is printed as a result of executing the following code segment? int i; int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 356

Multiple choice Iteration
What is printed as a result of executing the following code segment? int count = 0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 357

Multiple choice Iteration
What is printed as a result of executing the following code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 358

Multiple choice Iteration
What is printed as a result of executing the following code segment? int c = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 359

Multiple choice Iteration
What is printed as a result of executing the following code segment? int total = 0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 360

Multiple choice Iteration
What is printed as a result of executing the following code segment? int n =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 351 of 383
Page 36 of 39