3 ms·
Absolutely true. Note, though, that sizeof(int) == sizeof(char) is allowed if you have 16-bit chars.
by JoachimSchipper 14y ago
Absolutely true. Note, though, that sizeof(int) == sizeof(char) is allowed if you have 16-bit chars.
- cperciva 14y ago16-bit chars aren't allowed in modern versions of C -- CHAR_BIT is required to be 8.
- JoachimSchipper 14y agoThanks for the update! (For the curious: C99 or POSIX both require CHAR_BIT == 8.)
- pascal_cuoq 14y agoC99 only requires CHAR_BIT to be at least 8 (5.2.4.2.1:1). POSIX requires it to be exactly 8.
- cperciva 14y agoOops, quite right. I missed the "equal or greater in magnitude" line when I was reading that section.