Question
What is the output of this C code?
int main()
{
char chr;
chr = 128;
printf("%d\n", chr);
return 0;
}
int main()
{
char chr;
chr = 128;
printf("%d\n", chr);
return 0;
}
Answer: Option B
Was this answer helpful ?
signed char will be a negative number.
Output:
$ cc pgm2.c
$ a.out
-128
Was this answer helpful ?
Submit Solution