Here is the technique for converting an integer to a char array. I once had this as an interview question.
Modulo 10 picks off the last digit of the integer and an integer divide by 10 gets the next character.