Assuming the program is compiled to basec.exe:
basec 10 10 16 returns "a" which is correct
However, the reverse calculation seems incorrect:
basec a 16 10 returns "17" which is incorrect
The question is: Can the code actually convert from any base to any other base?