Simple number base converter in C