ProgrammingHard
With 16-bit unsigned arithmetic, (65535 x 2) & 0xFFFF is what?
- A. 65535
- B. 131070
- C. 0
- D. 65534
Correct answer: D. 65534
The product 131070 is reduced modulo 65536, which gives 65534.
More C Programming questions
- How many multiples of 4 lie between 1 and 100 inclusive?
- What is gcd(84, 36) by the Euclidean algorithm?
- How many divisors does 10 have among 1 through 10?
- int c = 0; for (int i = 0; i < 7; i++) for (int j = 0; j < 7; j++) if (i == j) c++; printf("%d", c); What is printed?
- static int next = 1; int f(void) { return next = 2; } / f is called three times; what does the third call return? /
- struct In { int v; }; struct Out { struct In in; int k; }; struct Out o = {{7}, 2}; printf("%d", o.in.v + o.k); What is printed?