“1.Binary”;
2.Ocatal;
3.hexadecimal;
switch(choice)
{
case 1:
base=2;
case 2:
base=8;
case 3:
base=16;
“enter your no\n”;
convert(num,base);
convert(int num,int base)
{
int rem;
rem=num%base;
num/=base;
if(num>0)
convert(num,base);
if(rem<10)
printf(“%d”,rem);
else
printf(“%c”,rem-10 + ‘A’);
}