debugging - Why (char)433 is equal to -79'+-' in c++? -
when type cast 433
char
this. how 433 equal -79
while ascii
4
& 3
52
& 51
respectively, according this table.
the decimal number 433
0x1b1
, , int
, 32 bits longs. happens when cast char
(which have 8 bits) lowest 8 bits thrown away, leaving 0xb1
-79
signed two-complement 8-bit integer.
Comments
Post a Comment