how to write a prog in c to convert decimal number into
binary by using recursen function,
Answer / madhavi
void decitobin(int n);
main()
{
int n;
printf("Enter an integer:");
scanf("%d",&n);
decitobin(n);
}
void decitobin(int n)
{
if(n>0)
{
decitobin(n/2);
printf("%d",n%2);
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
What are linker error?
Explain what does the function toupper() do?
what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason
What is the difference between near, far and huge pointers?
What is advantage of pointer in c?
What is character set?
Write code for atoi(x) where x is hexadecimal string.
what are the advantages of a macro over a function?
Write a function to find the area of a triangle whose length of three sides is given
write a c program to add two integer numbers without using arithmetic operator +
What is a memory leak? How to avoid it?
Can we initialize extern variable in c?