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 1,031–1,040 of 3,140
  1. 1031
  2. 1032
  3. 1033
  4. 1034
  5. 1035
  6. 1036
  7. 1037
  8. 1038
  9. 1039
  10. 1040

Question 1031

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1032

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1033

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: What is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1034

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int count = 5; for (int i = 3; i < 7; i = i + 2) { count…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1035

Multiple choice Unit 2: Selection and Iteration
Consider the following code. int x = 0; if (x == 0) System.out.print("1"); else System.out.print("2");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1036

Multiple choice Unit 2: Selection and Iteration
Consider the following boolean expression. (X && !Y) || (!X && Y) Which of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1037

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. boolean a = true, b = false; if (/* missing code */) System.out.print("Nice job."); else System.out.print("Nicer job.");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1038

Multiple choice Unit 2: Selection and Iteration
Suppose p and q are declared as boolean variables and have been initialized to unknown…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1039

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: for (int i = 200; i > 0; i /= 3) { if (i % 2 == 0)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1040

Multiple choice Unit 2: Selection and Iteration
Suppose p and q are declared as boolean variables and have been initialized to unknown…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,031 of 3,140
Page 104 of 314