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 951–960 of 2,811
  1. 951
  2. 952
  3. 953
  4. 954
  5. 955
  6. 956
  7. 957
  8. 958
  9. 959
  10. 960

Question 951

Multiple choice Unit 2: Selection and Iteration
Consider the following method. What does mystery(18) return? public static int mystery(int n) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 952

Multiple choice Unit 2: Selection and Iteration
Which of the following boolean expressions is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 953

Multiple choice Unit 2: Selection and Iteration
What is printed? int x = 15, y = 20, z = 10; String result = ""; if (x > z && y > x) { if (y - x…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 954

Multiple choice Unit 2: Selection and Iteration
This method computes the digit sum of a positive integer. What does it print when n = 156?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 955

Multiple choice Unit 2: Selection and Iteration
What is printed? int total = 0; for (int i = 1; i <= 50; i++) { if (i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 956

Multiple choice Unit 2: Selection and Iteration
What is printed? int count = 0; for (int i = 1; i <= 4; i++) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 957

Multiple choice Unit 2: Selection and Iteration
What is the result of executing the following code? int x = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 958

Multiple choice Unit 2: Selection and Iteration
What is printed? String s = "COMPUTER"; String result = ""; for (int i = 0; i <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 959

Multiple choice Unit 2: Selection and Iteration
Consider the following method. public static int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 960

Multiple choice Unit 2: Selection and Iteration
What is printed? int a = 5, b = 12; boolean p = !(a > 3 && b < 10); boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 951 of 2,811
Page 96 of 282