Verityprep
Question Bank · Unit 2

AP® Computer Science A Selection and Iteration Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Selection and Iteration, 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.

Subtopic: Iteration Clear filter

Questions 371–376 of 376
  1. 371
  2. 372
  3. 373
  4. 374
  5. 375
  6. 376

Question 371

Multiple choice Iteration
For every int n from 0 through 10 inclusive, which replacement leaves sum equal to the original…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 372

Multiple choice Iteration
Which replacement produces the same final values of both sum and k as the original? Each version…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 373

Multiple choice Iteration
The int variables low and high satisfy 1 <= low <= high <= 20. Which replacement makes hasDiv4 equal to true exactly when at least one multiple…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 374

Multiple choice Iteration
Consider the following code segment, where n is a random integer such that 1 <= n <= 15. What is the minimum number of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 375

Multiple choice Iteration
Which of the following code segments prints…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 376

Multiple choice Iteration
Which of the following code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 371 of 376
Page 38 of 38