1
#include<stdio.h>
int main ( void ){
float y = 12.0809;
printf("The number %.2f is a float\n");
return 0;
}
I know that %.2f
is used to consider only two decimal places, but would like to know what serves an entire number before the point. For example, %7.2f
or %3.2f
. If the number that comes after the point is used to limit the number of decimal places, then what is the number that comes before the point?
Perfect! Great reference, great response.
– Not The Real Hemingway