From k&R C
- First, if either operand is long double, the other is converted to long double.
- Otherwise, if either o
Do these conversions happen if a, b and c were short ?
Yes, integer promotions are done on all small integer types: char, short and C99 bool.
Strictly speaking, a C program cannot perform any form of arithmetic on anything smaller than an int
, unless the compiler optimizes away the integer promotions.