Is it always true that
The standards say nothing regarding the exact size of any integer types aside from
long is 32-bit on 32-bit systems and 64-bit on 64-bit systems.
So no, you can't make any assumptions on size. If you need a type of a specific size, you can use the types defined in
stdint.h. It defines the following types:
int8_t: signed 8-bit
uint8_t: unsigned 8-bit
int16_t: signed 16-bit
uint16_t: unsigned 16-bit
int32_t: signed 32-bit
uint32_t: unsigned 32-bit
int64_t: signed 64-bit
uint64_t: unsigned 64-bit
stdint.h header is described in section 7.18 of the standard, with exact width types in section 184.108.40.206. The standard states that these typedefs are optional, but they exist on most implementations.