Here is my code
#include void main() { char ch = 129; printf(\"%d\", ch); }
I get the output as -127. What d
The type char can be either signed or unsigned, it's up to the compiler. Most compilers have it as `signed.
char
signed
unsigned
In your case, the compiler silently converts the integer 129 to its signed variant, and puts it in an 8-bit field, which yields -127.