##### Synopsis

    #include <stdlib.h>
    long int atol(const char *nptr);

##### Description

atol converts the initial portion of the string pointed to by nptr to a long int representation.

atol does not affect the value of errno on an error. If the value of the result cannot be represented, the behavior is undefined.

Except for the behavior on error, atol is equivalent to `strtol(nptr, (char **)NULL, 10)`.

atol returns the converted value.

##### Portability

atol conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).

##### See Also

strtol