Type | Storage size | Value range
--- | --- | ---
short | 2 bytes | -2<sup>15</sup> to 2<sup>15</sup>-1
unsigned short | 2 bytes | 0 to 2<sup>16</sup>-1
int | 2 or 4 bytes | -2<sup>15</sup> to 2<sup>15</sup>-1 or -2<sup>31</sup> to 2<sup>31</sup>-1
unsigned int | 2 or 4 bytes | 0 to 2<sup>16</sup>-1 or 0 to 2<sup>32</sup>-1
long | 8 bytes | -2<sup>63</sup> to 2<sup>63</sup>-1
unsigned long | 8 bytes | 0 to 2<sup>64</sup>-1
Notes:
* Data type modifiers:
* Signed
* Unsigned
* Short
* Long
* Overflow:
* Signed integer overflow is undefined behaviour according to the standard.
* Unsigned integer ends up back at zero when overflowed.
```
#include <stdio.h>
int main()
{
short s = -1; printf("%d\n", s);
unsigned short us = 1; printf("%d\n", us);
int i = -1; printf("%d\n", i);
unsigned int ui = 1; printf("%d\n", ui);
long l = -1; printf("%ld\n", l);
unsigned long ul = 1; printf("%ld\n", ul);
return 0;
}
```
Outputs:
```
-1
1
-1
1
-1
1
```