Multiple choice

Short int x; /* assume x is 16 bits in size */, what is the maximum number that can be printed using printf(%d , x), assuming that x is initialized as shown above?

  1. 127

  2. 128

  3. 255

  4. 32, 767

  5. 65, 536

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A 16-bit signed short integer has a range from -32,768 to 32,767. Thus, the maximum value it can hold is 32,767.