#include<stdio.h>
#include<stdlib.h>
int main()
{
int n = 1254;
char str[20];
itoa(n,str,10);
printf("Number is %d \n",n);
printf("String value is %s \n",str);
return 0;
}
OUTPUT:
Number is 1245
String value is 1245
Let's connect think dots to code ...
#include<stdio.h>
#include<stdlib.h>
int main()
{
int n = 1254;
char str[20];
itoa(n,str,10);
printf("Number is %d \n",n);
printf("String value is %s \n",str);
return 0;
}
OUTPUT:
Number is 1245
String value is 1245