answersLogoWhite

0

How do you convert a binary number into a decimal in C?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

sprintf (to, "%d", value)

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert a binary number into a decimal in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a c program to convert binary number to decimal number?

How is this a question? Sounds like you should do more of your homework offline.


C program to convert decimal number into binary number?

#include<stdio.h> main() { int d,a; printf("enter the number"); scanf("%d",&a); do { d=a%2; } while(a=0); printf("binary=%d",&d); }


Convert decimal number 12 into hexa decimal number?

It is C


C plus plus program that convert decimal to binary using the concept of stack?

#include<stdio.h> #include<stdlib.h> main() { int number,binary[10000],b=0; printf("Enter decimal number "); scanf("%d",&number); printf("\nBinary: "); for(;number;number/=2,b++) binary[b]=number%2; for(b--;b>-1;b--) printf("%d ",binary[b]); }


Write a program in C to convert a binary number to its decimal equivalent?

#include#includemain(){int i,j=0,k;printf("enter u r binary number");scanf("%d",&i);while(i>0){k=i/10; // reminderi=i%10;// for dividentj=j+(k*pow(2,k));conversion function}printf("decimal number is :%d",j);}


Write a C program to convert hexadecimal number into decimal number?

pongada punda vayanungala ..................


What does B C D stand for in math?

Binary coded decimal. Each decimal digit is represented by its binary equivalent.


A c program to convert decimal number to decimal number?

The question asks to do nothing by converting a decimal into itself. Perhaps the question was mistyped. Please restate the question.


How do you convert A B C in binary code?

A = 1010 b = 1011 c = 1100


Decimal to binary conversion in c language?

sscanf, atoi, strtol, ...


C program to receive floating point and convert it into binary?

scanf