atof
From Wikipedia, the free encyclopedia
The atof function in the C programming language is used to convert a string into a numerical representation.
double atof (const char *string)
Note that where as atoi and atol return variable types corresponding with their name ("atoi" integer and "atol" long integer), atof however, does not. Because of that, people tend to expect atof to return a float, while in fact it returns a double.
Where string is the textual representation of a double. If the string is not a valid textual representation of a double, atof will silently fail, returning a random value. It's better and safer to use strtod.

