Write a program to binary to decimal and decimal to binary
AnswerBot
1y
A program to convert binary to decimal and decimal to binary.
For binary to decimal conversion, iterate through each digit of the binary number and multiply it by 2 raised to the power of its position....read more
Vani.D
2y
#include <stdio.h> #include <math.h> int convert(long long); int main() { long long n; printf("Enter a binary number: "); scanf("%lld", &n); printf("%lld in binary = %d in decimal", n, convert(n)); ...read more
Anonymous
2y
#include <stdio.h> #include <math.h> int convert(long long); int main() { long long n; printf("Enter a binary number: "); scanf("%lld", &n); printf("%lld in binary = %d in decimal", n, convert(n)); ...read more
Add answer anonymously...
Popular interview questions of Software Engineer
Top HR questions asked in 4W Technologies Software Engineer
>
4W Technologies Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app