// I know of three methods to do this.
//method 1: '#' is the preprocessor operator that converts to string.
//It is called stringification or stringizing operator.
#define TO_STR(x) #x
char *s=TO_STR(123;
//method 2: sprintf()
char*s;
sprintf(s,"%d",123);
//method 3: itoa(), the third parameter is base, so to convert number to binary, put base as 2.
char*s;
itoa(123,s,10)