Function name : itoa
Header file : <stdlib.h>
Function prototype : char *itoa(int i,char *s,int radix);
Function : Used to convert integers into strings
Parameters : int i is the number to be converted to characters
char *s is the converted pointer to a string
int radix is the base number for converting numbers
Return value : Returns a pointer to the converted string
Program example : Use this function to convert the integer 1725 into a string and output it
#include<stdio.h>#include<stdlib.h>#include<string.h>intmain(void){inti=1725;chars[10]={ };inradix=10;itoa(i,s, radix);printf(integer=%dstring=%sn,i,s);return0;}
Running results
integer=1725string=1725