fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}
above function is called as:
fun(10);
what will it print?
}
Answer Posted / amit
All are incorrect. Please try it on a machine and see...
The answer is 012510. Please not that it is 0 1 2 5 10 but
without spaces.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What is #include cctype?
How can I write functions that take a variable number of arguments?
What are data structures in c and how to use them?
What is c variable?
Is c procedural or functional?
Why doesnt that code work?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
how we can make 3d venturing graphics on outer interface
What is the use of linkage in c language?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Can we initialize extern variable in c?
What are file streams?