There is nothing "generic" in such function, or, in a way, the only one function is "generic enough". Here is one possible signature of such function:
char* Convert(int inputBase, int OutputBase, char* input);
or, more correct in C way, to avoid the problem of string deallocation:
void Convert(int inputBase, int OutputBase, char* input, char* output);
In the second case, the called should supply both char pointers preserving sufficient room for output value.
This is so because (please see my comment to the question), the notion of the base is only applicable to strings representing numbers, not the numbers (you can think of numbers as always binary). You just need to make a string based on input string. The body of this function is your home exercise. :-)
—SA