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 is a const pointer in c?
What is static memory allocation? Explain
What is the main difference between calloc () and malloc ()?
Explain how do you override a defined macro?
How can you pass an array to a function by value?
Explain what does the format %10.2 mean when included in a printf statement?
hi send me sample aptitude papers of cts?
What is a struct c#?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
How can I use a preprocessorif expression to ?
program for reversing a selected line word by word when multiple lines are given without using strrev
How do you print only part of a string?
what do the 'c' and 'v' in argc and argv stand for?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
How can you convert integers to binary or hexadecimal?