Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>itoa</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
itoa
====

Syntax
------

     #include <stdlib.h>
     
     char * itoa(int value, char *string, int radix)

Description
-----------

This function converts its argument VALUE into a null-terminated
character string using RADIX as the base of the number system.  The
resulting string with a length of upto 33 bytes (including the optional
sign and the terminating `NULL' is put into the buffer whose address is
given by STRING.  For radixes other than 10, VALUE is treated as an
unsigned int (i.e., the sign bit is not interpreted as such).  The
argument RADIX should specify the base, between 2 and 36, in which the
string reprsentation of VALUE is requested.

Return Value
------------

A pointer to STRING.

Example
-------

     char binary_str[33];
     
     (void)itoa(num, binary_str, 2);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson