Example of C language itoa function

Example of C language itoa function
/*
itoa()function with example in C language
*/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
    int a=1234;
    char buffer[20];
    itoa(a,buffer,2);  // Binary system
    printf("Binary: %s\n", buffer);

    itoa(a,buffer,10);  // Decimal
    printf("Decimal: %s\n", buffer);

    itoa(a,buffer,16);  // 
    printf("Hexadecimal: %s\n", buffer);
    return 0;
}
Sour‮ww:ec‬w.lautturi.com

output:

Binary: 10011010010
Decimal: 1234
Hexadecimal: 4d2
Created Time:2017-08-29 09:22:46  Author:lautturi