ProgrammingVery hard

printf("%lld", (999999999LL * 999999999LL) % 1000000007LL); What is printed?

  1. A. 1
  2. B. 64
  3. C. 49
  4. D. 999999999

Correct answer: B. 64

The product is about 10^18, which fits in 64 bits. Its remainder modulo 10^9 + 7 is 64.

More C Programming questions

Exams that ask this topic