how to convert int in to const char in c

C
 int size;
 char dispsize[100];
 sprintf(dispsize,"%d",size);
Source

Also in C: