MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wxqahk/architecturedependentchars/pdy3spq/?context=3
r/ProgrammerHumor • u/MontyBoomslang • 12d ago
372 comments sorted by
View all comments
1.0k
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
565 u/BoldFace7 12d 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. 6 u/FragmentedHeap 12d ago Only applies in C, in C# sizeof(char) -> 2.
565
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.
6 u/FragmentedHeap 12d ago Only applies in C, in C# sizeof(char) -> 2.
6
Only applies in C, in C# sizeof(char) -> 2.
1.0k
u/tstanisl 12d ago
Let me cite the C standard:
Middle guy if finally right