How to write a C Program To Convert Decimal To Binary Using Recursion in C Programming Language ?
Solution For C Program :
#include<stdio.h>
void main()
{
void dectobin(int);
int n;
printf("\nEnter Any Decimal Number : ");
scanf("%d", &n);
dectobin(n);
}
void dectobin(int a)
{
int d;
d = a % 2;
if(a != 0)
{
dectobin(a / 2);
printf("%d", d);
}
}
You may also learn these C Program/Code :
C Program To Swap Two Numbers Without Using Third Variable
Learn More :
Convert
- How To Write a C program that reads your first and last names and then converts them to upper-case and lower-case letters. The results will be printed to standard output console.
- C Program to Convert Text String to Binary
- C Program To Convert Temperature In Celsius To Fahrenheit, Using Function
- C Program To Convert Temperature Into Celsius
- C Program to Convert Celsius to Fahrenheit temperature
- C Program to convert a string to upper case
- C Program Convert MIDI note to pitch
- C Program to Convert Celcius to Fahrenheit and vice versa
- C Program to Convert a Decimal number to Octal Number
- C Program to Convert Number to Words in C
- C Program to Converts a Number to a String.
- C Program to Convert Celsius Temperature into Fahrenheit Temperature
- C Program to Recursively converts all file-names to lower-case
- C Program to accept string from user & convert all lower case letters into upper case letters & vice versa
- C Program to convert given decimal number into binary number
- C Program To Read The Adjecancy Matrix of Directed Graph And Convert It Into Adjecancy List
Decimal
Binary
Conversions
Recursion
- C Program Recursion Example
- C Program to find LCM and HCF Of Two Number Using Recursion - 3
- C Program To Generating Fibonacci Series Using Recursion
- C Program to Calculate GCD using recursion
- C Program To Calculate First Numbers Using Recursion
- C Program Finding the sum of Squares using Recursion
- Factorial Program In C Using Recursion