14-02-2014, 07:50 PM
Suppose I have:The essential type of each constant, '1u' and '2u', is unsigned char and the casts make the essential type of each operand unsigned short. Now, if shorts are 16 bits wide and chars are 8 bits wide, what is the essential type of the expression; unsigned char because of the value, '3u', or unsigned short because of the operands?
Code:
((unsigned short) 1u) + ((unsigned short) 2u);