#include <stdlib.h> long int atol(const char *nptr);
strtol(nptr, (char **)NULL, 10)
If successful, atol() returns the converted long int value represented in the string.
If unsuccessful, atol() returns an undefined value.