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
What are the standard predefined macros?
How are strings stored in c?
what is the basis for selection of arrays or pointers as data structure in a program
Explain two-dimensional array.
Distinguish between actual and formal arguments.
Tell us bitwise shift operators?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is array in c with example?
What is the purpose of sprintf() function?
How do you redirect a standard stream?
What is character set?
How to find a missed value, if you want to store 100 values in a 99 sized array?
Which built-in library function can be used to match a patter from the string?
Is c object oriented?
List some of the static data structures in C?