It responds 5 is 0 in base 5 with this code
EDIT: I changed rem to start with the value of num it now says five is 1 in base 2 and 50 is 0 in base 2
In your example... conv is initialized as 1 and num is set to 5 at runtime. Hence, power will be 0 when you begin your last while loop (the first thing you do there is power--). DO you really want a negative value for power?
Also... you have this variable called ten, but you initialize it to 0. Does that makes sense? Consider your line of code place = pow (ten, power).