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 191–200 of 2,811
  1. 191
  2. 192
  3. 193
  4. 194
  5. 195
  6. 196
  7. 197
  8. 198
  9. 199
  10. 200

Question 191

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: int a = 10; double b = 3.7; int c = 4; int x = (int) (a + b); double y = (double) a / c;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 192

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment. int var = 12; var = var % 7; var--;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 193

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment. int count = 5; double multiplier = 2.5; int answer = (int)(count * multiplier);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 194

Multiple choice Unit 1: Using Objects and Methods
3. Consider the following code segment. double x = 3.6; double y = 2; int a = 5, b =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 195

Multiple choice Unit 1: Using Objects and Methods
Consider the task of finding the average score in a game. int sum = / / a number representing the sum of all of the scores int count…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 196

Multiple choice Unit 1: Using Objects and Methods
Consider the code segment. int a = 16, b = 0; double c = a / b; The…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 197

Multiple choice Unit 1: Using Objects and Methods
Which print statement will produce the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 198

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment. String idk = "mnomnomno"; for (int i = 0; i < idk.length(); i++) { if (idk.substring(i, i + 1).equals("m")) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 199

Multiple choice Unit 1: Using Objects and Methods
Consider the following method. public String lengthen(String word) { int index = 0; while (index < word.length()) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 200

Multiple choice Unit 1: Using Objects and Methods
Consider the following method. public int mystery(String code, int index) { if (code.indexOf("c") == index) { return index; } return mystery(code.substring(2),…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 191 of 2,811
Page 20 of 282