Multiple choice

The following declaration means int x : 4;

  1. x is a 4-digit integer

  2. x cannot be greater than a 4 digit integer

  3. x is a 4-bit integer

  4. none of above

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

In C, the colon syntax in a struct declaration defines a bit-field. The integer x : 4 specifies that x will occupy exactly 4 bits of storage.