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 741–750 of 2,811
  1. 741
  2. 742
  3. 743
  4. 744
  5. 745
  6. 746
  7. 747
  8. 748
  9. 749
  10. 750

Question 741

Multiple choice Unit 2: Selection and Iteration
How many times does the following loop execute? // x has been initialized with a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 742

Multiple choice Unit 2: Selection and Iteration
What will the call to the method funWithNumbers(314159) print to the screen? public void funWithNumbers(double myDouble) { int myInt =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 743

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int x = 10; int y = 2; int count = 1; while(x > y)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 744

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int p = 5; while(p > 0) { for(int j = p; j < p*2; j++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 745

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int counter = 5; int sum = 0; while(counter < 10) { sum+= counter; counter+=2; } Which of the following for loops would…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 746

Multiple choice Unit 2: Selection and Iteration
How many times will the word "Heyo!" be printed in the following code segment? int count =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 747

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int num = 8; for(int i = num; i > 0; i -= 3) //Line 2 {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 748

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: for(int j = 0; j < 4; j++) //Line 1 { for(int k = 0; k < j+1; k++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 749

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int b = 10; String result = ""; while(b < 100) { result += b; b *=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 750

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 741 of 2,811
Page 75 of 282