FORMAT SPECIFIER WITH SOME PREFIX (%a.bf)
FORMAT SPECIFIER WITH SOME PREFIX (%a.bf)
output
#include <stdio.h>
int main()
{
float b=7.333;
printf( "%10.6f ", b);
return 0;
}
--7.333000
( total 10 digits including 2 spacing before decimal and 6 digits after decimal)
if we use minus before a.b then space will be left after the decimal
output
#include <stdio.h>
int main()
{
float b=7.333;
printf( "%-10.6f ", b);
return 0;
}
input
7.333000--
Comments
Post a Comment