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 is the size of enum in bytes?
What is #error and use of it?
What is the difference between Printf(..) and sprint(...) ?
Can we access array using pointer in c language?
What is calloc()?
Explain what is wrong with this program statement? Void = 10;
What is #include conio h?
Is c programming hard?
What is difference between static and global variable in c?
What is the size of a union variable?
explain what is a newline escape sequence?
given post order,in order construct the corresponding binary tree
What is the difference between class and object in c?
What is wrong in this statement? scanf(ā%dā,whatnumber);
Is c is a high level language?