#include
//Compiler version gcc 6.3.0
int main(void)
{
float a=10;
printf(\"%f\"+1,a);
return 0;
}
Output -- d
You should definitely compile with all warnings. I used gcc -Wall -Wextra -Werror -pedantic
. It didn't compile with my warnings because there are too many arguments for printf.
When I tested out the code you posted, it printed 'f' and 'A???'. I'm not sure what you're trying to do, but I believe it has to do with how your float is adding with the number to give you an Ascii character.