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 / raj

0 1 2 5 10...Please don't post the wrong answer.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

‎How to define structures? · ‎

630


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15049


Can stdout be forced to print somewhere other than the screen?

627


When should structures be passed by values or by references?

585


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

1744






What are the advantages of using linked list for tree construction?

645


What is build process in c?

645


Explain how do you determine a file’s attributes?

594


What are void pointers in c?

574


What is static identifier?

704


What is the use of a ‘’ character?

586


Simplify the program segment if X = B then C ← true else C ← false

2587


What is the purpose of void in c?

619


What is the use of #define preprocessor in c?

618


When the macros gets expanded?

790