Please check the following snippet:
unsigned char a = 100;
unsigned char b = 100;
unsigned char c = 100;
unsigned short x = a * b + c;
I expected this would overflow and the calculation would be done in 8-bit type unsigned char (not in 16-bit unsigned short), exceeding the value range of unsigned char. But it doesn't.
Why does the calculation not overflow in C and C++?