Why does the following code work?
char c = 'A';
printf("%d - size: %d", c, sizeof(c));
Prints out:
65 - size: 1
Why is the output not garbage, since an int would usually be 4 bytes long and we can clearly see that the char is 1 byte long. Does the compiler do the implicit conversation?