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 681–690 of 2,811
  1. 681
  2. 682
  3. 683
  4. 684
  5. 685
  6. 686
  7. 687
  8. 688
  9. 689
  10. 690

Question 681

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 682

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. Assume num is a properly declared and initialized int variable. if (num > 0) { if (num % 2 == 0) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 683

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int num = /* initial value not shown */; boolean bl = true; if (num > 0) { if (num >= 100) { bl = false; } } else {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 684

Multiple choice Unit 2: Selection and Iteration
Which of the following code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 685

Multiple choice Unit 2: Selection and Iteration
Assume that a, b, and c are boolean variables that have been properly declared and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 686

Multiple choice Unit 2: Selection and Iteration
Consider the following two code segments. Assume that the int variables m and n have been properly declared and initialized and are both greater than 0. I. for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 687

Multiple choice Unit 2: Selection and Iteration
Consider the following statement. Assume that a and b are properly declared and initialized boolean variables.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 688

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. Assume that num3 > num2 > 0. int num1 = 0; int num2 = /* initial value not shown */; int num3 = /* initial value not…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 689

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. for (int r = 3; r > 0; r--) { int c; for (c = 1; c < r; c++) { System.out.print("-"); } for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 690

Multiple choice Unit 2: Selection and Iteration
Assume that x and y are boolean variables and have been properly initialized. (x || y)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 681 of 2,811
Page 69 of 282