Header File
stdlib.h
Category
Conversion Routines, Math Routines
Prototype
char *ultoa(unsigned long value, char *string, int radix);
wchar_t *_ultow(unsigned long value, wchar_t *string, int radix);
Description
Converts an unsigned long to a string.
ultoa converts value to a null-terminated string and stores the result in string. value is an unsigned long.
radix specifies the base to be used in converting value; it must be between 2 and 36, inclusive. ultoa performs no overflow checking, and if value is negative and radix equals 10, it does not set the minus sign.
ultoa returns string.
Example
#include <stdlib.h> #include <stdio.h> int main( void ) { unsigned long lnumber = 3123456789L; char string[25]; ultoa(lnumber,string,10); printf("string = %s unsigned long = %lu\n",string,lnumber); return 0; }
Portability
|
POSIX |
Win32 |
ANSI C |
ANSI C++ |
ultoa |
|
+ |
|
|
_ultow |
|
+ |
|
|
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|