Character array conversion to integer value of type unsigned long long int.
#include <stdlib.h> unsigned long int strtoul(const char *nptr, char **endptr, int base);
nptr
A pointer to a nul-terminated character string to convert.
endptr
A pointer to the position in nptr that could not be converted.
base
A numberic base between 2 and 36.
The strtoull() function converts a character array, pointed to by nptr, expected to represent an integer expressed in radix base to an integer value of type unsigned long long int. If the sequence pointed to by nptr is a minus sign, the value resulting from the conversion is negated in the return value.
The base argument in strtoull() specifies the base used for conversion. It must have a value between 2 and 36, or 0. The letters a (or A) through z (or Z) are used for the values 10 through 35; only letters and digits representing values less than base are permitted. If base is 0, then strtoull() converts the character array based on its format. Character arrays beginning with'0' are assumed to be octal, number strings beginning with'0x' or'0X' are assumed to be hexadecimal. All other number strings are assumed to be decimal.
If the endptr argument is not a null pointer, it is assigned a pointer to a position within the character array pointed to by nptr. This position marks the first character that is not convertible to a long int value.
In other than the "C" l ocale, additional locale-specific subject sequence forms may be accepted. This function skips leading white space.
The function strtoull() returns an unsigned integer value of type unsigned long long int (which may have a negative sign if the original string was negative.) If the converted value is greater than ULLONG_MAX, strtoull() returns ULLONG_MAX and sets errno to ERANGE. The ULLONG_MAX macro is defined in limits.h.
This function is not specified in the ISO/IEC standards. It is an extension of the standard library.