Type Promotion/ Automatic Casting
When one type of data is assigned to another type of variable, an automatic type conversion will take place if
-The two types are compatible. E.g. boolean and char is not compatible.
-The destination type is larger than source type.
For example, the int type is always large enough to hold all valid short values, and both int and short are integer types, so an automatic conversion from short to int can be applied.
#include <stdio.h>
int main()
{
int i = 17;
char c = 'c'; /* ascii value is 99 */
int sum;
sum = i + c;
printf("Value of sum : %d\n", sum );
return 0;
}

