Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 911–920 of 2,811
  1. 911
  2. 912
  3. 913
  4. 914
  5. 915
  6. 916
  7. 917
  8. 918
  9. 919
  10. 920

Question 911

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: for (int i = 1; i < 100; i = i * 2) { if (i / 50 ==…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 912

Multiple choice Unit 2: Selection and Iteration
Consider the following output: 0 1 0 2 4 0 3 6 9 0 4 8 12 16…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 913

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int x = 10; int y = 3; boolean b = true; for (int i = 0; i < 15; i += 5) { x…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 914

Multiple choice Unit 2: Selection and Iteration
In the following statement, a and b are boolean variables: boolean c =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 915

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: while ((x > y) || y >= z) { //code not shown } In the code segment above,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 916

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int x = 10; int y = x / 3; int z = x % 2; x++;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 917

Multiple choice Unit 2: Selection and Iteration
Consider the following code segments: I. int x = 10; int y = 20; int z = 0; if (x < y && 10 < y/z) { System.out.println("Homer"); } else {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 918

Multiple choice Unit 2: Selection and Iteration
Given int x = 7 and int y = 3, what is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 919

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int sum = 0; for (int i = 1; i <= 5; i++) { if (i % 2 ==…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 920

Multiple choice Unit 2: Selection and Iteration
Consider the following boolean expression: !(x > 5 && y < 10) ||…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 911 of 2,811
Page 92 of 282