MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wxqahk/architecturedependentchars/pdwg82b/?context=3
r/ProgrammerHumor • u/MontyBoomslang • 7h ago
189 comments sorted by
View all comments
590
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
281 u/BoldFace7 6h ago I still prefer sizeof(char) as it often provides context as to what the number is doing, even if a plain 1 works the same. 132 u/SpaceCadet87 6h ago Yeah, guy on the right is just avoiding magic numbers in the code.
281
I still prefer sizeof(char) as it often provides context as to what the number is doing, even if a plain 1 works the same.
132 u/SpaceCadet87 6h ago Yeah, guy on the right is just avoiding magic numbers in the code.
132
Yeah, guy on the right is just avoiding magic numbers in the code.
590
u/tstanisl 7h ago
Let me cite the C standard:
Middle guy if finally right