how to print integer as character in c code example
Example 1: how to print int in c
#include <stdio.h>
int main() {
int number;
printf("Enter an integer: ");
scanf("%d", &number);
printf("You entered: %d", number);
return 0;
}
Example 2: int to char in c
c = i +'0';
Example 3: how to convert int in to const char in c
int size;
char dispsize[100];
sprintf(dispsize,"%d",size);