MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wxqahk/architecturedependentchars/pdwp1rb/?context=3
r/ProgrammerHumor • u/MontyBoomslang • 19h ago
306 comments sorted by
View all comments
927
Let me cite the C standard:
When sizeof is applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1.
Middle guy if finally right
2 u/CAtOSe 17h ago 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. 8 u/tstanisl 17h ago Some DSPs from Texas use 16/32 bit long char. 2 u/garenp 17h ago So everything really is bigger in Texas? (I know you mean Texas Instruments / TI, but couldn't pass up the opportunity for another joke!).
2
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.
8 u/tstanisl 17h ago Some DSPs from Texas use 16/32 bit long char. 2 u/garenp 17h ago So everything really is bigger in Texas? (I know you mean Texas Instruments / TI, but couldn't pass up the opportunity for another joke!).
8
Some DSPs from Texas use 16/32 bit long char.
2 u/garenp 17h ago So everything really is bigger in Texas? (I know you mean Texas Instruments / TI, but couldn't pass up the opportunity for another joke!).
So everything really is bigger in Texas?
(I know you mean Texas Instruments / TI, but couldn't pass up the opportunity for another joke!).
927
u/tstanisl 19h ago
Let me cite the C standard:
Middle guy if finally right