Next: Directory Manipulation Up: C Standard Library Functions Previous: Character Classification and Conversion

Data Conversion

#include <stdlib.h>

double atof(char *string) - Convert string to floating point value.

int atoi(char *string) - Convert string to an integer value.

int atol(char *string) - Convert string to a long integer value.

char *itoa(int value, char *string, int radix) - Convert an integer value to a string using given radix.

char *ltoa(long value, char *string, int radix) - Convert long integer to string in a given radix.

double strtod(char *string, char *endptr) - Convert string to a floating point value.

long strtol(char *string, char *endptr, int radix) - Convert string to a long integer using a given radix.

unsigned long strtoul(char *string, char *endptr, int radix) - Convert string to unsigned long.


Dave.Marshall@cm.cf.ac.uk
Wed Sep 14 10:06:31 BST 1994