I tried to print character as a float in printf and got output 0. What is the reason for this. Also:
char c=\'z\'; printf(\"%f %X\",c,c);
You need to use a cast operator like this:
char c = 'z'; printf("%f %X", (float)c, c);
or
printf("%f %X", (double)c, c);
In Xcode, if I do not do this, I get the warning:
Format specifies specifies 'double' but the argument has type 'char', and the output is 0.000000.