Here is my code
#include void main() { char ch = 129; printf(\"%d\", ch); }
I get the output as -127. What d
char is 8 bits, signed. It can only hold values -128 to 127. When you try and assign 129 to it you get the result you see because the bit that indicates signing is flipped. Another way to think of it is that the number "wraps" around.
char
129