how to convert binary to decimal and decimal to binary in C
lanaguage

Answer Posted / naveen bhatt

#include<stdio.h>
#include<conio.h>
void main()
{
int i,r,d,num;
for(i=1;i<=num;i++)
r=num%2;
num=d*num/2;
printf("\n the valueis=%d",r);
getch();
}

Is This Answer Correct ?    4 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you print only part of a string?

609


What is the use of a static variable in c?

587


What is the difference between char array and char pointer?

525


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2332


Explain how can you tell whether a program was compiled using c versus c++?

571






What is output redirection?

687


What is the difference between new and malloc functions?

574


What is the full form of getch?

580


Can variables be declared anywhere in c?

614


How to establish connection with oracle database software from c language?

1671


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

663


Difference between strcpy() and memcpy() function?

673


How do you determine the length of a string value that was stored in a variable?

647


What is the sizeof () operator?

619


State the difference between realloc and free.

627