Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

Random digits printed when printing more than 6 decimal digits in float datatype in C (GCC compiler) [duplicate]

$
0
0

I was executing following C code-

float a=3.25678932;
printf("%0.10f\n",a);

The above printf() statement giving following output:

3.2567892075

I am not able to understand how other four digits('2075') are coming after first six digits('256789') after decimal.


Viewing all articles
Browse latest Browse all 22113