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 701–710 of 2,811
  1. 701
  2. 702
  3. 703
  4. 704
  5. 705
  6. 706
  7. 707
  8. 708
  9. 709
  10. 710

Question 701

Multiple choice Unit 2: Selection and Iteration
Assume that a and b are variables of type int. The expression !(a < b) && !(a > b)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 702

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int a = 24; int b = 30; while (b != 0) { int r = a % b; a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 703

Multiple choice Unit 2: Selection and Iteration
Consider the following code segments. Which of the code segments above will produce the following output? I. int k = 1; while (k < 20) { if (k % 3 == 1)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 704

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. double a = 1.1; double b = 1.2; if ((a + b) * (a - b) != (a * a) - (b * b)) { System.out.println("Mathematical error!");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 705

Multiple choice Unit 2: Selection and Iteration
Which of the following code segments is equivalent to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 706

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int p = 5; int q = 2; int sum = 0; while (p <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 707

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 708

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 709

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 710

Multiple choice Unit 2: Selection and Iteration
What is the output from the following code segment? for (int j = 1; j…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 701 of 2,811
Page 71 of 282