0
What is the output of this code? (I am confused with the c value especially?
int a = 13; unsigned int b = 37; char c; printf("%d%d%d", a, b, c);
3 Answers
+ 2
DEBANJAN GHOSH
here c = null;
and the ASCII code of null is 0.
%d tells printf that the corresponding argument is to be treated as an integer value, therefore the char values gets converted to its corrospondent ASCII code.
check out the ASCII codes of characters:-
https://theasciicode.com.ar/
+ 1
Some compilers initialize uninitialized variable with 0 value.
But this is compiler dependent. In some compilers you will get garbage value.
0
How 0 will come, can u explain?