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


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between the expression '++a' and 'a++'?

604


What is gets() function?

639


Explain enumerated types.

573


Explain bit masking in c?

605


Which is best book for data structures in c?

576






What is a stream?

622


Can i use “int” data type to store the value 32768? Why?

732


How can I pad a string to a known length?

591


Under what circumstances does a name clash occur?

657


what is the syallabus of computer science students in group- 1?

1814


Explain what does the format %10.2 mean when included in a printf statement?

745


Differentiate between the = symbol and == symbol?

672


What is main function in c?

527


What does the file stdio.h contain?

582


How can I write a function analogous to scanf?

621