ultoa

Converts an unsigned long integer into the equivalent string in base notation

Local Servers:nonblocking
Remote Servers:N/A
Classification:Other
Service:String Conversion

Syntax

  #include <stdlib.h>  
   
  char *ultoa  (  
     unsigned long int   value,   
     char               *buffer,   
     int                 radix);
  

Parameters

value
(IN) Specifies an unsigned long value.
buffer
(OUT) Points to the character array.
radix
(IN) Specifies the base to be used when converting the integer.

Return Values

ultoa returns the pointer to the result.

Remarks

The ultoa function converts the unsigned long integer value into the equivalent string in base radix notation, storing the result in the character array pointed to by buffer. A NULL character is appended to the result. The size of buffer must be at least 33 bytes when converting values in base 2.

See Also

atol, ltoa, strtol, strtoul, utoa

Example

  #include <stdlib.h>  
   
  void print_value (unsigned long int value)  
  {  
     int base;  
     char buffer[33];  
     for (base=2; base<36; ++base)  
        printf ("%s\n", ultoa (value, buffer, base) );  
  }