ProgrammingVery hard
printf("%lld", (999999999LL * 999999999LL) % 1000000007LL); What is printed?
- A. 1
- B. 64
- C. 49
- 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
- printf("%d %d", -17 % 5, 17 % -5); What is printed in C99?
- printf("%d", (-17 % 5 + 5) % 5); What is printed in C99?
- What is printed? c #include <stdio.h> int main(void) { int a[] = {1, 2, 3, 4, 5, 6}; int l = a, r = a + 5; while (l < r) { int t = l; l++…
- What is printed? c #include <stdio.h> int main(void) { int a[] = {4, 1, 7, 3, 9}, p[6] = {0}; for (int i = 0; i < 5; i++) p[i + 1] = p[i]…
- A qsort comparator must order the uint16t values by high byte descending and, for equal high bytes, by low byte ascending. What is…
- What is printed? c #include <stdio.h> unsigned sumd(unsigned n) { return n == 0 ? 0 : n % 10 + sumd(n / 10); } int main(void) {…