Is it possible to get the string representation of an int. So I mean if i have:
5, I want to get '5'.
I was searching in the internet and I found this solution:
which works fine for small numbers, but if I do:Code:int number = 5; char c = number + '0';
At some point some strange sings like %&/)/)§$%&) are appearing, But i really need this huge numbers as well .. Is there any other way to do this??Code:int i; char c; for(i =0; i < 10000; i++) { c = i + '0'; printf("%c\n", c); }