_ultoa, _ultow
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

_ultoa, _ultow

Convert an unsigned long integer to a string.

char *_ultoa(
   unsigned long value,
   char *string,
   int radix 
wchar_t *_ultow(
   unsigned long value,
   wchar_t *string,
   int radix 


Number to be converted.
String result.
Base of value.

Return Value

Each of these functions returns a pointer to string. There is no error return.


The _ultoa function converts value to a null-terminated character string and stores the result (up to 33 bytes) in string. No overflow checking is performed. radix specifies the base of value; radix must be in the range 2 – 36. _ultow is a wide-character version of _ultoa.

Generic-Text Routine Mappings

TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined
_ultot _ultoa _ultoa _ultow


Routine Required header Compatibility
_ultoa <stdlib.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_ultow <stdlib.h> or <wchar.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.


See the example for _itoa.

See Also

Data Conversion Routines | _itoa | _ltoa | Run-Time Routines and .NET Framework Equivalents

© 2015 Microsoft