Converts a string to a long integer.
#include <stdlib.h>
long long atoll (nptr)
const char *nptr;
long atol (nptr)
const char *nptr;
The atoll and atol subroutines (str) are equivalent to strtoll(nptr, (char **)NULL, 10) and strtol(nptr, (char **)NULL, 10), respectively. If the value cannot be represented, the behavior is undefined.
Item | Description |
---|---|
nptr | Points to the string to be converted into a long integer. |
The atoll and atol subroutines return the converted value if the value can be represented.