3 ms·
Those are two different things: For 'char has 8 bits': the bitwidth is 'implementation defined' in C. If you know your target architectures, you can assume it'
by beeforpork 6y ago
Those are two different things:
For 'char has 8 bits': the bitwidth is 'implementation defined' in C. If you know your target architectures, you can assume it's 8 bits, because it's indeed a question of portability.
For 'int must not overflow': this is 'undefined behaviour' in C. You must not do it, regardless of what you know about your target architectures, because this is a language level prohibition.