Firstly, I want you to read this page.
Now that that's clarified, you need to decide how will you represent numbers with base higher that 16.
Secondly, "any number system to any number system" is pretty vague. Most ( if not all ) computers store numbers in binary. So you'll want to convert "any number system to binary" and "binary to any number system".
Hint: A lookup table is the fastest/easiest way to to it. For example:
Code:
void printBinary(unsigned int num)
{
char digits[2] = { '0', '1' };
char temp[65] = "";
char number[65] = "";
do
{
temp[0] = digits[num % 2];
temp[1] = '\0';
strcat(temp, number);
strcpy(number, temp);
num /= 2;
}while (num != 0);
printf("%s", number);
}
Be warned, this code is untested.