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: Boolean Expressions Clear filter

Questions 211–220 of 316
  1. 211
  2. 212
  3. 213
  4. 214
  5. 215
  6. 216
  7. 217
  8. 218
  9. 219
  10. 220

Question 211

Multiple choice Boolean Expressions
What happens when this code runs? int p = 5; int q = 2; boolean result…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 212

Multiple choice Boolean Expressions
What is printed? int a = 10; int b = 4; boolean earlier = a / b == 2; a %= b; b -=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 213

Multiple choice Boolean Expressions
What is printed? int n = 13; int d = 5; double first = (double) (n / d); double second =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 214

Multiple choice Boolean Expressions
The variable n has type int. Which offered value makes the entire…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 215

Multiple choice Boolean Expressions
What is printed? double reading = -7.8; int whole = (int) reading; int half = (int) (reading / 2);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 216

Multiple choice Boolean Expressions
The int variables completed and total satisfy 0 <= completed <= total and 1 <= total <= 1000. A task is sufficiently…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 217

Multiple choice Boolean Expressions
What happens when this code runs? int numerator = 9; int divisor = 2 / 3; boolean valid = divisor >=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 218

Multiple choice Boolean Expressions
What is printed? int total = 6; int group = 2; total /= group; group -= total; boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 219

Multiple choice Boolean Expressions
A request is valid only when used is from 0 through 10 inclusive. Within that range, it is allowed when space remains or…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 220

Multiple choice Boolean Expressions
An int x qualifies when it belongs to exactly one of these inclusive…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 211 of 316
Page 22 of 32