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 1,121–1,130 of 2,811
  1. 1121
  2. 1122
  3. 1123
  4. 1124
  5. 1125
  6. 1126
  7. 1127
  8. 1128
  9. 1129
  10. 1130

Question 1121

Multiple choice Unit 2: Selection and Iteration
What is the value of count after the following code segment is executed? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1122

Multiple choice Unit 2: Selection and Iteration
What is printed by the following code segment? String s = "abcdef"; String r = ""; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1123

Multiple choice Unit 2: Selection and Iteration
What is printed by the following code segment? int num = 4738; int sum =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1124

Multiple choice Unit 2: Selection and Iteration
The following code segment is intended to count the integers from 1 to 60, inclusive, that are divisible by 4 but not divisible by 6. Which of the following can…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1125

Multiple choice Unit 2: Selection and Iteration
What is printed by the following code segment? int a = 1; int b = 2; for (int i =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1126

Multiple choice Unit 2: Selection and Iteration
What is the value of total after the following code segment is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1127

Multiple choice Unit 2: Selection and Iteration
What is the result of compiling and running the following code segment?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1128

Multiple choice Unit 2: Selection and Iteration
What is the value of bonus after the following code segment is executed? int pts = 85; int bonus = 0; if (pts >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1129

Multiple choice Unit 2: Selection and Iteration
The following loop terminates normally. Which of the following must be true…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1130

Multiple choice Unit 2: Selection and Iteration
What is printed by the following code segment? double result = 0; for (int i = 1; i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,121 of 2,811
Page 113 of 282