Answer Posted / subhashini
#include<stdio.h>
#include<conio.h>
{
clrscr();
int i,sum,n;
printf("enter the number");
scanf("%d",&n);
while(n>=1)
{
i=n%2;
sum=sum*10+i;
n=n/2;
getch();
}
printf("the binary number is: %d",i)
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
How would you rename a function in C?
Explain what is wrong with this program statement? Void = 10;
Can we initialize extern variable in c?
Explain how do you print only part of a string?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Explain what are compound statements?
Why shouldn’t I start variable names with underscores?
Can include files be nested? How many levels deep can include files be nested?
What is derived datatype in c?
Can a variable be both static and volatile in c?
What is the use of static variable in c?
Is null valid for pointers to functions?
What is the importance of c in your views?
What is linear search?
How important is structure in life?