Why can I cast implicitly an integer to a char in C
I was wondering, why is casting implicitly from an integer to a char
possible in C ?
If for example :
int i = 2789;
printf("%c\n",i);
would give me a char back, because it would have truncated the bits
starting from the most significant ones. But usually you can't really cast
implicitly if it means you'll lose in precision so why can I do it here ?
No comments:
Post a Comment