ProgrammingVery hardGATE CS · Campus placements

uint32_t p = 65536u * 65537u; What is p?

  1. A. 65536
  2. B. 4295032832
  3. C. 65537
  4. D. 0

Correct answer: A. 65536

65536 * 65537 = 2^32 + 65536, and the product wraps modulo 2^32 to 65536. The raw product 4295032832 cannot be stored in uint32_t.

More C Programming questions

Exams that ask this topic