Short, long, signed, unsigned are called the data type qualifiers and can be used with any data type. A short int requires less space than int and long int may require more space than int. If int and short int takes 2 bytes, then long int takes 4 bytes.
Unsigned bits use all bits for magnitude; therefore, this type of number can be larger. For example signed int ranges from –32768 to +32767 and unsigned int ranges from 0 to 65,535. Similarly, char data type of data is used to store a character. It requires 1 byte. Signed char values range from –128 to 127 and unsigned char value range from 0 to 255. These can be summarized as follows:
| Data Type | Size (bytes) | Range |
|---|---|---|
| Short int | 2 | -32,768 to 32,767 |
| int | 2 | -32,768 to 32,767 |
| Signed int | 2 | -32,768 to 32,767 |
| Unsigned int | 2 | 0 to 65,535 |
| Long int | 4 | -2,147,483,648 to 2,147,483,647 |
| Signed char | 1 | -128 to 127 |
| Unsigned char | 1 | 0 to 255 |