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 361–370 of 383
  1. 361
  2. 362
  3. 363
  4. 364
  5. 365
  6. 366
  7. 367
  8. 368
  9. 369
  10. 370

Question 361

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 362

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 363

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 364

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 365

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 366

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 367

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 368

Multiple choice Iteration
What is printed as a result of executing the following code segment? for (int i = 1; i <= 4; i++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 369

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 370

Multiple choice Iteration
What is printed as a result of executing the following code segment? for (int i = 3; i >= 1; i--) { for (int j = 0; j…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 361 of 383
Page 37 of 39