C program to convert integer to string using itoa() function.

#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

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.