Conversion Functions

Functions for converting strings to numbers are found in the following listing.

Listing: AN SI-C string/number conversion functions


int           atoi(const char *s);
long          atol(const char *s);

double        atof(const char *s);

long          strtol(const char *s, char **end, int base);

unsigned long strtoul(const char *s, char **end, int base);

double        strtod(const char *s, char **end);