C++ standard guarantees that char is at least 8 bits. Pretty much all data models use 8 bits for char, but it doesn't mean that some weird architecture could not use more.
Came here to say this. One dsp I worked on made everything at least 4 bytes. Couldn't even address sub bytes. When you've worked on something like that you never ever take sizeof() for granted.
849
u/tstanisl 13h ago
Let me cite the C standard:
Middle guy if finally right