atof function


The C library function double atof(const char *str) converts the string argument str to a floating-point number (type double). If no valid conversion could be performed, it returns zero (0.0). If no valid conversion could be performed, it returns zero. In most implementations, pasing a null pointer will cause a segementation fault. ^  Replaced with strtod.

Library:   stdlib.h

Prototype: double atof(const char *ptr);

Syntax:	  

example program.


See also:

atoi String to integer conversion.

atol String to long integer conversion.

strtod String to double conversion.

strtol String to long integer conversion.

strtoul String to unsigned long integer conversion.


Top Master Index Keywords Functions


Martin Leslie