3 ms·
Byte and char are not the same thing. I had an OCD incident few years back and did a lot of thoughtful reading of all things readable on the subject. In distil
by huhtenberg 15y ago
Byte and char are not the same thing.
I had an OCD incident few years back and did a lot of thoughtful reading of all things readable on the subject. In distilled form the sacred knowledge is this - as far as the C standard is concerned, a byte is always exactly 8 bits, and a char is AT LEAST 8 bits. In fact, there is a compiler that operates in terms of 60 bit chars and that's the one on older Cray machines.
- tedunangst 15y agoNo, a byte is not always 8 bits. byte and char are basically synonymous. byte -- addressable unit of data storage large enough to hold any member of the basic character set of the execution environment. ... Note 2: A byte is composed of a contiguous sequence of bits, the number of which is implementation-defined.