Syntax
#include <stdlib.h>
double atof(const char *string);
Arguments
string character string
Return Value
The numeric value of the double type
Description
Converts the specified character string to a numerical value of the
double type by parsing the character string in the following manner:
[whitespace][{sign}][digits][.digits][{e|E}[sign]digits]
- <whitespace>
- space, NULL, or tab character
- <sign>
- + or -
- <digits>
- decimal digit character sting that is more than one digit
An exponent part (following e or E) can be put after the decimal number. Conversion is terminated when an unrecognizable character appears as part of the number.