Here is the source code of the C program to display a linked list in reverse. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
* C Program to Print Binary Equivalent of an Integer using Recursion
int num, bin;
printf("Enter a decimal number: ");
bin = binary_conversion(num);
printf("The binary equivalent of %d is %d\n", num, bin);
int binary_conversion(int num)
if (num == 0)
return (num % 2) + 10 * binary_conversion(num / 2);
$ gcc binary_recr.c -o binary_recr $ a.out Enter a decimal number: 10 The binary equivalent of 10 is 1010
Sanfoundry Global Education & Learning Series – 1000 C Programs.
Here’s the list of Best Reference Books in C Programming, Data-Structures and Algorithms
If you liked this C Program, kindly share, recommend or like below!