const cast in cpp code example Example: how to convert int in to const char in c int size; char dispsize[100]; sprintf(dispsize,"%d",size);