K
karthikbalaguru
Hi,
In the below code , i get the output as
45.8 if i specify the printf format specifier
as %1.1f. But, how ?
int main(void)
{
float b = 45.78;
printf("%1.1f",b);
return 0;
}
Shouldn't it throw an error for trying to print
45.8 in %1.1f format ?
Any ideas ?
Thx in advans,
Karthik Balaguru
In the below code , i get the output as
45.8 if i specify the printf format specifier
as %1.1f. But, how ?
int main(void)
{
float b = 45.78;
printf("%1.1f",b);
return 0;
}
Shouldn't it throw an error for trying to print
45.8 in %1.1f format ?
Any ideas ?
Thx in advans,
Karthik Balaguru