Make a function that returns a char * and takes an integer as a parameter, or perhaps a void function that has an array of chars along with the int, and the size of the of array of chars as parameters.
In the function use a loop while the int is greater than zero to extract and assign each digit of the integer using % 10 + '0' to the array of chars; divide the int by 10; increment the index pos of the array of chars.
After the loop exits, the array of chars will be backward, so reverse it. Lastly, terminate the array of chars using 0 or '\0'.
Comments
Make a function that returns a char * and takes an integer as a parameter, or perhaps a void function that has an array of chars along with the int, and the size of the of array of chars as parameters.
In the function use a loop while the int is greater than zero to extract and assign each digit of the integer using % 10 + '0' to the array of chars; divide the int by 10; increment the index pos of the array of chars.
After the loop exits, the array of chars will be backward, so reverse it. Lastly, terminate the array of chars using 0 or '\0'.
Post your code if you need more help.