0
What is %a %f etc in variables.
I don't get why these are necessary in variables
7 Réponses
+ 1
Each format specify each type of variable. For example, %f is for float. So if you need to put a float variable into the string, use it like "My float: %f". And put the variable at another paremeter. For example, printf("My float: %f, theFloatVariable);
You also need format specifier for scanf.
+ 2
They are format specifier. When you need to put variables into the string. You need to use them.
+ 1
Thank you
+ 1
CarrieForle %a and %A does exist, but I forgot when it's added.
+ 1
LastSecond959 after some searching I found out %a actually exists. Thanks for your correction.
Here is what I found:
%a was added in C99. It is used to display a hexadecimal (16 based) of a float and double. And so was %A.
0
Thank you. But what formats do they specify