ProgrammingHard

With 32-bit unsigned int, what is 65536u * 65536u?

  1. A. 4294967296
  2. B. 0
  3. C. 1
  4. D. 65536

Correct answer: B. 0

The true product 2^32 wraps modulo 2^32 for unsigned arithmetic, so the result is 0.

More C Programming questions

Exams that ask this topic