C program to convert number from Decimal to Binary April 13, 2021 Convert Given Decimal Number to Binary Number/*C program to convert number from decimal to binary*/ #include <stdio.h> int main(){ int number,cnt,i; int bin[32]; printf("Enter decimal number: "); scanf("%d",&number); cnt=0; /*initialize index to zero*/ while(number>0) { bin[cnt]=number%2; number=number/2; cnt++; } /*print value in reverse order*/ printf("Binary value is: "); for(i=(cnt-1); i>=0;i--) printf("%d",bin[i]); return 0;}--------------------------------------------------------------Output Tweet Share Share Share Share About Code2Chef Computer Hardware or Software does nothing without a computer program guiding. Related Post C program to convert number from Binary to Decimal Number A Given Binary Number to Decimal Number /* C program to convert the given binary number C program to calculate ageAge Calculator/*Age Calculator */ #include <stdio.h>#include <time.h> /*checkA C Program to Find Armstrong Number Check The Given Number Is Armstrong Number/* C program to check whether a number is armstrongCheck Prime Number using C program Given Number is Prime Number or Not /*Program to check entered number is whether prime o
ConversionConversion EmoticonEmoticon