answersLogoWhite

0

hi.jope it will solve your problem. void main() { int b=5,r,i=0,p=0;

while(b>0)

{

r=b%2;

a[i]=r;

b=b/2;

i++;

p++;

}

p--;

for(i=p;i>=0;i--)

{

printf("%d",a[i]);

}

}

} }

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Decimal to binary conversion in c language?

sscanf, atoi, strtol, ...


Code for binary trees written in C using graphics?

cg code for binary tree


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


What is the importance of using functions in a c program?

C programs do not function without functions.


What does 'C date and time functions' refer to?

C date and time functions refer to a group of functions in the standard library of the C programming language that implements time and date operations like conversion between date formats.


How do you write a program in C using the fprint and fscan functions?

By using those two functions in your code.


What are the functions of Atoi itoa and gcvt in C language?

All these are conversion functions - atoi()-string to integer.itoa()-integer to string.gcvt()-double to string


How is the code return in higher programming languages like C and C converted into binary language?

By using a compiler.


Write a C program that takes a binary file as input and finds error check using different mechanisms?

write a c program that takes a binary file as input and finds error check using different mechanisms.


What is formatted functions in c?

functions which have been modified by using different return types


How you describe operations of stack ADT using c template functions?

No, because C does not support the concept of template functions. Template functions only exist in C++, never in C.


Write a program of binary heap in c or c language?

to implement operations on binary heap in c