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
Should a function contain a return statement if it does not return a value?
Is c easier than java?
What is the stack in c?
Why can arithmetic operations not be performed on void pointers?
What are the different types of linkage exist in c?
What are dangling pointers in c?
What is && in c programming?
differentiate built-in functions and user – defined functions.
How is actual parameter different from the formal parameter?
Does free set pointer to null?
What is %d used for?
How can you invoke another program from within a C program?
Can true be a variable name in c?
Are there constructors in c?
What is data type long in c?