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 61–70 of 316
  1. 61
  2. 62
  3. 63
  4. 64
  5. 65
  6. 66
  7. 67
  8. 68
  9. 69
  10. 70

Question 61

Multiple choice Boolean Expressions
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 62

Multiple choice Boolean Expressions
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 63

Multiple choice Boolean Expressions
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 64

Multiple choice Boolean Expressions
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 65

Multiple choice Boolean Expressions
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 66

Multiple choice Boolean Expressions
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 67

Multiple choice Boolean Expressions
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 68

Multiple choice Boolean Expressions
Given that a, b, and c are integers, consider the boolean expression (a < b) || !((c…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 69

Multiple choice Boolean Expressions
In the following code segment, you may assume that a, b, and n are all type int. if (a != b && n / (a - b) >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 70

Multiple choice Boolean Expressions
The speed limit of a stretch of highway is 55 miles per hour (mph). The highway patrol issues speeding tickets to anyone caught going faster than 55 miles per…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 61 of 316
Page 7 of 32