Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, 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 821–830 of 3,140
  1. 821
  2. 822
  3. 823
  4. 824
  5. 825
  6. 826
  7. 827
  8. 828
  9. 829
  10. 830

Question 821

Multiple choice Unit 2: Selection and Iteration
Which statement could be added to the while loop below so that it doesn't run indefinitely?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 822

Multiple choice Unit 2: Selection and Iteration
What does the following code print? int x = -4;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 823

Multiple choice Unit 2: Selection and Iteration
How many times will the following code print out the value of x? public static…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 824

Multiple choice Unit 2: Selection and Iteration
Which for loop will…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 825

Multiple choice Unit 2: Selection and Iteration
Why do we use…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 826

Multiple choice Unit 2: Selection and 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 827

Multiple choice Unit 2: Selection and 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 828

Multiple choice Unit 2: Selection and 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 829

Multiple choice Unit 2: Selection and 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 830

Multiple choice Unit 2: Selection and 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 821 of 3,140
Page 83 of 314