Motivation: I tried once to use the
itoa()
function in one of my c programs, but it seems that it doesn't work... so I decided to make my own implementation to cast an int into string.
This code was based on various resources, still it is easy to understand and to use. For example:
int main()
{
char str[100];
printf("the result of itoa: %s", itoa(3267,str,10));
return 0;
}