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 801–810 of 2,811
  1. 801
  2. 802
  3. 803
  4. 804
  5. 805
  6. 806
  7. 807
  8. 808
  9. 809
  10. 810

Question 801

Multiple choice Unit 2: Selection and Iteration
Which of the following Java expressions evaluates to true if the int variable…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 802

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. for (int j = 0;j < 4;j++) { for ( / * missing code * / ) { System.out.print("(" + j + "," + k + ") "); }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 803

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. if (n != 0 && x / n > 100) statement1; else…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 804

Multiple choice Unit 2: Selection and Iteration
What will the output be for the following poorly formatted program segment, if the input value for num is 22? int num = call to a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 805

Multiple choice Unit 2: Selection and Iteration
What values are stored in x and y after execution of the following program segment? int x = 30, y =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 806

Multiple choice Unit 2: Selection and Iteration
Which of the following will evaluate to true only…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 807

Multiple choice Unit 2: Selection and Iteration
Assume that a and b are integers. The boolean expression !(a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 808

Multiple choice Unit 2: Selection and Iteration
Given that a, b, and c are integers, consider the boolean expression (a < b) || !((c…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 809

Multiple choice Unit 2: Selection and Iteration
In the following code segment, you may assume that a, b, and n are all type int. if (a != b && n / (a - b) >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 810

Multiple choice Unit 2: Selection and Iteration
Given that n and count are both of type int, which statement is true about the following code segments? I for (count = 1;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 801 of 2,811
Page 81 of 282