Unit 1 Cycle 2 Day 4: I/II/III: Integer Division Rules
Share
I/II/III: Integer Division Rules
Section 1.3 — Expressions and Assignment
Key Concept
I/II/III format questions present three statements and ask which combination is correct. For integer division, the key rules are: (1) int / int always produces int with truncation, (2) if either operand is double, the result is double, and (3) assignment to a double variable does not change how the division was computed. These questions test whether you can evaluate each statement independently rather than being influenced by the others. Eliminate statements you are certain about first to narrow the answer.
Consider the following expressions where a = 23 and b = 7.
Which of the expressions evaluate to true?
Answer: (C) I and III only
Evaluate each with a = 23, b = 7:
I: 23 / 7 = 3 (integer division). 3 == 3 is true.
II: 23 % 7 = 2 (since 7 * 3 = 21, remainder is 2). 2 == 3 is false.
III: 23 / 7 * 7 + 23 % 7 = 3 * 7 + 2 = 21 + 2 = 23. 23 == 23 is true. This identity always holds: (a/b)*b + a%b == a.
Why Not the Others?
(A) Statement III is also true. The division-modulo identity (a/b)*b + a%b == a holds for all integers (where b is not zero).
(B) Statement II is false. 23 % 7 = 2, not 3. Students often confuse the quotient (3) with the remainder (2).
(D) Statement II is false. The remainder of 23 divided by 7 is 2 (since 7 * 3 = 21 and 23 - 21 = 2).
Common Mistake
The quotient and remainder are different values. For 23 / 7: quotient is 3, remainder is 2. Statement III demonstrates the fundamental identity that relates division and modulo: the quotient times the divisor plus the remainder always equals the original number.
AP Exam Tip
For I/II/III questions, evaluate each statement completely before looking at answers. Mark each TRUE or FALSE independently, then match your results to the options. This prevents being tricked by partially correct answers.