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 81–90 of 316
  1. 81
  2. 82
  3. 83
  4. 84
  5. 85
  6. 86
  7. 87
  8. 88
  9. 89
  10. 90

Question 81

Multiple choice Boolean Expressions
Assume truth1 and truth2 are boolean variables that have been properly declared and initialized. Consider…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 82

Multiple choice Boolean Expressions
Assume that the variable declarations have been made. int a = 7, b = 15, c = -6; Which will…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 83

Multiple choice Boolean Expressions
At a certain high school students receive letter grades based on the following scale. Numeric Score Letter Grade 93 or above A From 84 to 92 inclusive B From 75…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 84

Multiple choice Boolean Expressions
Consider the following code segment. int num1 = 9; int num2 = 5; if (num1 > num2) { System.out.print((num1 + num2) %…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 85

Multiple choice Boolean Expressions
Consider the following code segment. int value = initValue; if (value > 10) if (value > 15) value = 0; else value =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 86

Multiple choice Boolean Expressions
Assume that a, b, and c have been declared and initialized with int values. The expression !(a > b || b…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 87

Multiple choice Boolean Expressions
A high school class places students in a course based on their average from a previous course. Students that have an average 92 or above are placed in an honors…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 88

Multiple choice Boolean Expressions
Assume that x, y, and z have been declared as follows: boolean x = true; boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 89

Multiple choice Boolean Expressions
Consider the following code segment. int amount = initValue; if (amount…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 90

Multiple choice Boolean Expressions
Which segment of code will correctly print the two Strings name1 and name2 in alphabetical order? if (name1 < name2) System.out.println(name1 + " " + name2); I.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 81 of 316
Page 9 of 32