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.

Questions 51–60 of 740
  1. 51
  2. 52
  3. 53
  4. 54
  5. 55
  6. 56
  7. 57
  8. 58
  9. 59
  10. 60

Question 51

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 52

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 53

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 54

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 55

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 56

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 57

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 58

Multiple choice Iteration
How many times does the following loop iterate? // x has been…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 59

Multiple choice Iteration
How many times does the following loop iterate? // x has been initialized with a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 60

Multiple choice Iteration
How many times does the following loop execute? // x has been initialized with a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 51 of 740
Page 6 of 74