Multiple choice technology databases

mod(-15, 4)would return ?

  1. 15

  2. -15

  3. -3

  4. 3

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The mod function returns the remainder of division. -15 ÷ 4 = -3 with remainder -3, since -3 × 4 = -12 and -15 - (-12) = -3. Different languages handle negative operands differently, but -15 and 4 would typically give remainder -3 or 1 depending on implementation.