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
What header files do I need in order to define the standard library functions I use?
How do c compilers work?
What are Macros? What are its advantages and disadvantages?
Is stack a keyword in c?
What does struct node * mean?
Is fortran still used in 2018?
When should a type cast be used?
Can we assign string to char pointer?
For what purpose null pointer used?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
Is multithreading possible in c?
Is file a keyword in c?
What is register variable in c language?
What is the difference between procedural and functional programming?
What is c variable?