strtol
strtol is a function in the C standard library that converts the initial portion of the string pointed to by nptr to a long int. It is declared in stdlib.h as long int strtol(const char *nptr, char **endptr, int base).
Behavior: The function discards leading whitespace, accepts an optional sign, and then interprets as many valid
Return value and error handling: If the parsed value lies within the range of long int, that
Notes: The base must be 0 or between 2 and 36 inclusive; values outside that range yield