atof() is returning ambiguous value

Viewed 4717

I am trying to convert a character array into double in c using atof and receiving ambiguous output.

printf("%lf\n",atof("5"));

prints

262144.000000

I am stunned. Can somebody explain me where am I going wrong?

2 Answers
Related