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 / hemavathiarun
Hi all,
since the code is calling the same function with different
values,it's not at all possible to move to printf statement
until x becomes < 0
so only when the compiler gets the value of x as 0 the loop
will be stopped.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is function prototype in c language?
Do character constants represent numerical values?
Explain the concept and use of type void.
What is derived datatype in c?
Can stdout be forced to print somewhere other than the screen?
how to make a scientific calculater ?
What is the translation phases used in c language?
Which of these functions is safer to use : fgets(), gets()? Why?
what will be the output for the following main() { printf("hi" "hello"); }
What is a method in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
please explain every phase in the "SDLC" in the dotnet.
What are loops c?
What is dynamic variable in c?
Tell us bitwise shift operators?