atof

Converts a string to a double.

double atof (char * string);

Required Header
<stdlib.h>

Return Value

This function returns the double representation of string.

Parameters

string

  The string to be converted to a double

Remarks

The atof function converts string to a double precision number, where the conversion stops at the first character that is not recognisable as a number in the form:

[whitespace][sign][digits][.digits][{d | D | e | E}[sign]digits]

Standard Library

See Also    _ecvt, _fcvt, _gcvt, strtod, strtol