Try this:
------------------NumtoString.c----------------------
#include <stdio.h>
main()
{
int i=123456789;
int a=1,k=0;
char j,str[20];
while(a!=0)
{
a=i%10;
i=(i-a)/10;
switch(a)
{ case 0: j='0';break;
case 1: j='1';break;
case 2: j='2';break;
case 3: j='3';break;
case 4: j='4';break;
case 5: j='5';break;
case 6: j='6';break;
case 7: j='7';break;
case 8: j='8';break;
case 9: j='9';break;
}
str[k]=j;
k++;
}
str[k-1]='\0';
printf("%s\n",str);
getch();
}