Because character types are actually stored in the form of ASCII values, which is the same as plastic, the corresponding ASCII values are used when numerical calculation is directly used, which is equivalent to the operation of plastic data and floating-point data.
Can give a simple example, easy to understand and verify, as follows:
# include & ltstdio.h & gt
void main(){
char a = ' m
Floating point b =12.32;
Printf ("the value of a is% c, and the value of b is %.2f\n\n", a, b);
Printf ("Output character data a (value m) is an integer: %d\n", a);
Printf(" a+b output is %.2f\n ",A+B);
}
Give it a try and see the result.