Confused, Why does this work when I compile, when hold is an integer?
char value = 'p';
int hold = value;
printf("%c", hold);
Confused, Why does this work when I compile, when hold is an integer?
char value = 'p';
int hold = value;
printf("%c", hold);
First, in
int hold = value;
is performed implicit conversion from char to int.
Second, in
printf("%c", hold);
the %c specifier means something as convert it to char and print it as symbol.