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 711–720 of 2,811
  1. 711
  2. 712
  3. 713
  4. 714
  5. 715
  6. 716
  7. 717
  8. 718
  9. 719
  10. 720

Question 711

Multiple choice Unit 2: Selection and Iteration
What are the first and last values output by the following code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 712

Multiple choice Unit 2: Selection and Iteration
The Boolean expression (x==y && !(x==y)) || ( x!=y &&…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 713

Multiple choice Unit 2: Selection and Iteration
What are the values of a and b after the for loop finishes? int a = 5, b…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 714

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int x = 7; int y = 3; if ((x < 10) && (y < 0)) System.out.println("Value is: "…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 715

Multiple choice Unit 2: Selection and Iteration
Assume that a and b have been defined and initialized as int values. The expression !(!(a !=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 716

Multiple choice Unit 2: Selection and Iteration
Questions refer to the following method. public static int mystery(int n) { int x = 1; int y = 1; // Point A while (n > 2)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 717

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. for (int k = 1; k <= 100; k++) if ((k % 4) == 0)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 718

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int sum = 0; int k = 1; while (sum < 12 || k < 4) sum…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 719

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int num = 2574; int result = 0; while (num > 0) { result = result * 10 +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 720

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int x = 1; while ( /* missing code */ ) { System.out.print(x + " "); x = x + 2; } Consider the following possible…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 711 of 2,811
Page 72 of 282