What will be the output of the following C code?

#include <stdio.h>

int main()

{

signed char chr;

chr = 128;

printf("%d\n", chr);

return 0;

}

a) 128
b) -128
c) Depends on the compiler
d) None of the mentioned

Answer: b
Explanation: signed char will be a negative number.

Posted on by