variable a
is an integer (int
), and integers take 4 bytes (regardless of what value is stored in it).
Just because the specific value could be represented by fewer bits, it does not change the size of the variable.
solved sizeof return type in C