SyntaxFix
Write A Post
Hire A Developer
Questions
Simply use the macros from <float.h> and the variable-width conversion specifier (".*"):
<float.h>
".*"
float f = 3.14159265358979323846; printf("%.*f\n", FLT_DIG, f);