ProgrammingVery hard

With 64-bit arithmetic, what is (10^9 x 10^9) mod (10^9 + 7)?

  1. A. 1
  2. B. 7
  3. C. 1000000007
  4. D. 49

Correct answer: D. 49

10^18 mod (10^9 + 7) = 49, since 10^9 is congruent to -7 and (-7)^2 = 49.

More C Programming questions

Exams that ask this topic