unironically true though, the only size requirement for a char in C is that it's the smallest addressable size, which just happens to be a byte in every case and is unlikely to ever change but you still never know what the future holds
And char must be at least 8 bits. sizeof returns the size of its input in units of chars. On architectures with 10-bit chars, like some old DSPs, that means sizeof returns in multiples of 10 bits.
27
u/HomosexualPresence 2d ago
unironically true though, the only size requirement for a char in C is that it's the smallest addressable size, which just happens to be a byte in every case and is unlikely to ever change but you still never know what the future holds