Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice 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 781–790 of 3,140
  1. 781
  2. 782
  3. 783
  4. 784
  5. 785
  6. 786
  7. 787
  8. 788
  9. 789
  10. 790

Question 781

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 782

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 783

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 784

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 785

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 786

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. for (int outer = 1; outer <= 6; outer++) { for (int inner = outer; inner <= 6; inner++) { if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 787

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 788

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int count = 0; for (int x = 0; x < 4; x++) { for (int y = x; y < 4;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 789

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int value = 15; while (value < 28) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 790

Multiple choice Unit 2: Selection and Iteration
A teacher put three bonus questions on a test and awarded 5 extra points to anyone who answered all three bonus questions correctly and no extra points…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 781 of 3,140
Page 79 of 314