In C, arithmetic operations involving a char and an int, the char is implicitly converted to an int according to the ASCII value of the character.
The ASCII value of the character ‘x’ is 120. Therefore, when adding 5 and ‘x’, the value of ‘x’ (120) is added to 5.
So, after the execution of int a, b = 5;
char c = ‘x’;
a = b + c;
the value of a would be:
a = 5 + 120
a = 125