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

10,5,2,1

after that it terminated.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string in c language?

715


How does pointer work in c?

721


Explain how can you avoid including a header more than once?

687


Explain how can I convert a string to a number?

724


What are the advantage of c language?

644






What is the advantage of using #define to declare a constant?

717


What do you mean by c what are the main characteristics of c language?

665


What is a shell structure examples?

688


Hi can anyone tell what is a start up code?

1725


What does void main () mean?

829


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

705


Explain what is the difference between functions getch() and getche()?

695


Explain what is a program flowchart and explain how does it help in writing a program?

753


What is the right type to use for boolean values in c? Is there a standard type?

668


Can we use any name in place of argv and argc as command line arguments?

699