#include <stdlib.h>
long atol(const char *s);
atol() converts the string s to an long 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 the followingatol() is as follows:
Number = [+|-]Digit{Digit}
atol() returns the converted long value.