Atof
Atoi
Atol
ASCII to number conversions
double atof
char *ptr
long atol
char *ptr
int atoi
char *ptr
Description
Conversions of the string pointed to by "ptr" to the relevant
number type are carried out by these functions. They cease to
convert a number when the first unrecognized character is
encountered.
Each skips leading spaces and tab characters. Atof()
recognizes an optional sign followed by a digit string that
could possibly contain a decimal point, then an optional "e"
or "E", and optional sign and a digit string. Atol() and atoi()
recognize an optional sign and a digit string.
Caveats
Overflow causes unpredictable results. There are no error
indications.