ITOA(DOS) XENIX System V ITOA(DOS)
Name
itoa - Converts integers to characters.
Syntax
#include <stdlib.h>
char *itoa (value, string, radix);
int value;
char *string;
int radix;
Description
The itoa function converts the digits of the given value to
a null-terminated character string and stores the result in
string. The radix argument specifies the base of value. It
must be in the range 2-36. If radix equals 10 and value is
negative, the first character of the stored string is the
minus sign (-).
Return Value
itoa returns a pointer to string. There is no error return.
See Also
ltoa(DOS), ultoa(DOS)
Example
#include <stdlib.h>
int radix = 8; char buffer[20]; char *p; . .
. p = itoa (-3445,buffer,radix); /* p = "171213"
*/
Notes
The space allocated for string must be large enough to hold
the returned string. The function can return up to 17
bytes.
This call must be compiled with the -dos flag.
Page 1 (printed 8/7/87)