example 123456789 返回char 123456789
#include <stdio.h>
#include <stdlib.h>
char b[32]={0};
char a[32]={0};
char *iToString( int iVal )
{
int i=0,j=0;
int temp;
while( iVal > 0 ){
a[i] = (iVal % 10) + 0x30;
i++;
iVal = iVal /10;
}//end of while
temp = 1;
for(j=0; j< i; j++){
b[j] = a[i-temp];
temp++;
}
return b;
}
int main()
{
printf("%s
", iToString(123456789));
return 0;
}