The compiler basically adds the casts for you when needed. The following program:
Code:
#include <stdio.h>
int main() {
int a = 2;
char b = 'b';
printf("%i", a + b);
return 0;
}
will compile into the exact same executable when the cast is explicit:
Code:
#include <stdio.h>
int main() {
int a = 2;
char b = 'b';
printf("%i", a + (int)b);
return 0;
}