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 31–40 of 383
  1. 31
  2. 32
  3. 33
  4. 34
  5. 35
  6. 36
  7. 37
  8. 38
  9. 39
  10. 40

Question 31

Multiple choice Iteration
Which for loop will…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 32

Multiple choice Iteration
Why do we use…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 33

Multiple choice Iteration
What does the following code print? for (int i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 34

Multiple choice Iteration
What does the following code print? for (int i = 1; i < 6; i++) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 35

Multiple choice Iteration
How many stars are output when the following code is executed? for (int i =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 36

Multiple choice Iteration
1 1 1 1 2 2 2 3 3 4 Which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 37

Multiple choice Iteration
What is printed as a result of executing the following code snippet? for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 38

Multiple choice Iteration
How often is the inner…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 39

Multiple choice Iteration
Consider the following code snippet. Is count < 5 always true, always false, or sometimes true/sometimes…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 40

Multiple choice Iteration
Consider the following code snippet. Is count < 5 always true, always false, or sometimes true/sometimes false at point 2? int count = 0; while (count…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 31 of 383
Page 4 of 39