answersLogoWhite

0

Binary conversion using functions in C?

Updated: 8/17/2019
User Avatar

Suganyan

Lvl 1
15y ago

Best Answer

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

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Binary conversion using functions in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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


What is formatted functions in c?

functions which have been modified by using different return types


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.


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

By using a compiler.


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.


How do you refresh stack using library functions in C programming?

What do you mean by stack-refreshing? Anyway, there are no stack handling functions in the standard C library.