Write a Program in C to convert Decimal number to Binary
Write a program to find the binar equivalent of this number using recursion. A positive integer is entered through the keyboard. Like Decimal Value 2(Input)-Binary value 10(Output).
I know how to convert decimal to binary but I’ve found that converting binary to decimal is much much harder. Maybe my knowledge about the codes is limited to most most basic.
//Binary equivalent of a binary number
int binary (int);
printf(“nEnter The Number: “);
printf(“nnnnnPress any key to exit…..”);
//function to convert deciaml to binary
int binary (int n)
printf(“nThe binary equivalent is %d”,r);
One Reply to “Write a Program in C to convert Decimal number to Binary”
I’m really enjoying the design and layout of your website. It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a developer to create your theme? Outstanding work!