Answer Posted / kk
let the number be n
int bin(int n)
{
static int sum=0;
if(n>1)
{
rem=n%2;
sum = sum *10 +rem;
n=n/2;
bin(n);
}
else
{
sum=sum*10+1;
}
return sum;
}
| Is This Answer Correct ? | 7 Yes | 8 No |
Post New Answer View All Answers
Explain is it better to bitshift a value than to multiply by 2?
I need previous papers of CSC.......plz help out by posting them.......
What is a constant?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is string length in c?
How do you determine the length of a string value that was stored in a variable?
program for reversing a selected line word by word when multiple lines are given without using strrev
What are data types in c language?
What are unions in c?
What happens if you free a pointer twice?
explain what is fifo?
What is the difference between array and pointer?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?