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 931–940 of 3,140
  1. 931
  2. 932
  3. 933
  4. 934
  5. 935
  6. 936
  7. 937
  8. 938
  9. 939
  10. 940

Question 931

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 932

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int t = 0; for (int v = 1;v < 20;/ * missing increment * / ) { t = t + v; } Which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 933

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int x = 102; int y = 5; int c = 0; while (x - y >=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 934

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 935

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 936

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 937

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 938

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 939

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 940

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 931 of 3,140
Page 94 of 314