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

Strictly speaking the answer is undefined until someone forces the output text from the console buffer to the screen.
Otherwise it would normally print 012510

Debug it inside MSVC and witness no output. In reality though most implementations will do a final flush to screen....

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c basic?

715


Why is struct padding needed?

716


What is typedef?

809


What are pointers?

722


Why is python slower than c?

705






How can I recover the file name given an open stream?

632


Explain how do you determine the length of a string value that was stored in a variable?

768


Do you know null pointer?

691


Who invented b language?

1031


Are bit fields portable?

792


Can a file other than a .h file be included with #include?

776


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1501


Which programming language is best for getting job 2020?

688


What is nested structure?

670


Whats s or c mean?

685