What went wrong was that hh, mm, and ss are pointers to memory locations, but you never allocated any memory for them to point to, and you never made them point to anything.
Failing to have done that, hh, mm, and ss are equivalent to:
char hh, mm, ss;
itoa(hhI,hh,10); will write beyond the array bounds, since the terminating NULL that itoa adds to make a string is all that will actually fit in the array.
When you then try to concatenate a bunch more stuff:
that all fails to, since there is only room for one character in the array.
Finally, hh, mm, and ss are local variables that go out of scope at the end of the function, so you can not return them.
You can get around the problem by making the arrays fixed size and static, as leppie suggests, or by using malloc to dynamically allocate space for hh, mm, and ss, and then returning the pointer to the allocated space.
Since the return value is returned using pass by value, the value of the pointer (the memory location that was dynamically allocated) is copied into some local variable in the calling function. The hh variable still goes out of scope, but the memory that it points to is not freed when the pointer goes out of scope.
If you go this way, be sure to free the dynamically allocated space when you are done with it, to avoid running out of memory.
By the way,
But somthings go wrong
It's much more useful if you tell us [u]what/u goes wrong.