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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -