ProgrammingVery hard

printf("%d", (unsigned short)70000); What is printed with a 16-bit unsigned short?

  1. A. 70000
  2. B. 4465
  3. C. 0
  4. D. 4464

Correct answer: D. 4464

Converting to unsigned short takes the value modulo 65536, and 70000 - 65536 = 4464.

More C Programming questions

Exams that ask this topic