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.

Questions 451–460 of 692
  1. 451
  2. 452
  3. 453
  4. 454
  5. 455
  6. 456
  7. 457
  8. 458
  9. 459
  10. 460

Question 451

Multiple choice Iteration
What is printed by the following code segment? int a = 1; int b =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 452

Multiple choice Iteration
What is printed by the following code segment? for (int i = 3; i >= 1; i--) { for (int j = 1; j <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 453

Multiple choice Boolean Expressions
What is printed? int samples = 17; int seconds = 5; double rate = samples / seconds;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 454

Multiple choice Boolean Expressions
What is printed? int count = 5; double size = 2.0; boolean first = count / size == count / 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 455

Multiple choice Boolean Expressions
What is printed? int amount = 14; int groups = 4; boolean p = amount / groups > 3; boolean q =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 456

Multiple choice Boolean Expressions
The variable count is a positive int. The requirement is to accept it when count / 5.0 is greater than 3.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 457

Multiple choice Boolean Expressions
An int variable n satisfies 0 <= n <= 50. Which list contains all…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 458

Multiple choice Boolean Expressions
What is printed? int score = 70; boolean passed = score >= 75; score += 10;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 459

Multiple choice Boolean Expressions
The int variables x and limit have already been initialized. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 460

Multiple choice Boolean Expressions
A lab grants access if a person is staff, or if the person is both a member and paid. A suspended person must always…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 451 of 692
Page 46 of 70