ProgrammingHard

printf("%d", (1u << 31) / 2); What is printed with a 32-bit unsigned int?

  1. A. 2147483648
  2. B. 536870912
  3. C. 1073741824
  4. D. 0

Correct answer: C. 1073741824

1u << 31 is 2147483648, and dividing by 2 gives 2^30 = 1073741824.

More C Programming questions

Exams that ask this topic