atof()

Syntax
  #include <stdlib.h>

  
  double atof(const char *s);

  
Description

atof() converts the string s to a double floating point value, ignoring white space at the beginning of s. It stops converting when it reaches either the end of the string or a character that cannot be part of the number. The number format accepted by atof() is as follows:

  FloatNum       = Sign{Digit}[.{Digit}][Exp]

  
  Sign           = [+|-]

  
  Digit          = <any decimal digit from 0 to 9>

  
  Exp            = (e|E) SignDigit{Digit}

  
Return

atof() returns the converted double floating point value.

See also

atoi()

strtod()

strtol()

strtoul()