strtoul

Converts a string to an unsigned long integer.

unsigned long strtoul (char * string, char ** endptr, int base);

Required Header
<stdlib.h>

Return Value

This function returns the unsigned long integer representation of string.

Parameters

string

  The string to be converted to an unsigned long integer

endptr

  A pointer to the character which stops the scan

base

  The base of the number being converted

Remarks

The strtoul function converts string to an unsigned long integer number, where the conversion stops at the first character that is not recognisable as a number in the form:

[whitespace][digits]

Standard Library

See Also    atoi, atol, strtol, strtoll, strtoull, strtod