Actually returning a char* isn't a good idea, because you would need to malloc the memory for it and return the pointer to it, and it's good style to malloc and free in the same function.
So it's a better idea to create the string in the calling function and pass the pointer to that string in, for the function to modify. For example: void getbaserep(int number, int base, char *output) { ... }

However as long as you remember that getbaserep() allocates memory and remember to free that memory when you don't need it any more, returning a char* is fine. It's just that kind of thing easily gets forgotten.