Answer Posted / naresh m
main()
{
int a[12],n,m,i=0;
printf("enter the no to find binary no's");
scanf("%d",&n);
while(n!=0)
{
m=i++;
a[i]=n%2;
n=n/2;
}
printf("binary value is");
for(i=m;i>=0;i--)
{
printf("%d",a[i]);
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is there sort function in c?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
write a program to find out prime number using sieve case?
What does printf does?
What is typedef struct in c?
can anyone please tell about the nested interrupts?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
What is the ANSI C Standard?
What are the 4 types of programming language?
State two uses of pointers in C?
What is difference between scanf and gets?
Can I initialize unions?
What are multibyte characters?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is a string?