3 ms·
Just in case anyone else finds this fascinating: Correct, sizeof(char) is always 1 byte. A byte contains CHAR_BIT bits (page 37). The implementation-defined val
by pjtr 11y ago
Just in case anyone else finds this fascinating: Correct, sizeof(char) is always 1 byte. A byte contains CHAR_BIT bits (page 37). The implementation-defined value of CHAR_BIT is at least 8 (page 21). There are some implementations [1] that chose other values like 16 or 32. So while sizeof(char) is always 1 byte it's not necessarily always 1 octet.
[1] http://bytes.com/topic/c/answers/223565-implementations-char_bit-32-a http://bytes.com/topic/c/answers/223565-implementations-char...