I've been programming in C and C++ for a long time and so I got the answer to the quiz right. This kind of looseness in the language definition is why embedded programmers learn to stick to the fixed-size integer types, like uint8_t, int16_t, etc., defined in <stdint.h>
This doesn't fully solve the issues related to integer promotion, I think, but if you specify uint8_t, and there isn't an underlying type that exactly matches that size, the compiler should tell you, and you can re-think what you are doing (or, more likely, whether you want to continue to try to work with that toolchain and platform).
This doesn't fully solve the issues related to integer promotion, I think, but if you specify uint8_t, and there isn't an underlying type that exactly matches that size, the compiler should tell you, and you can re-think what you are doing (or, more likely, whether you want to continue to try to work with that toolchain and platform).