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

What is the use of getch ()?

590


What is const keyword in c?

716


i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me

1457


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

633


What is extern keyword in c?

607






What is pointer to pointer in c with example?

531


How can you find the exact size of a data type in c?

577


What are the loops in c?

571


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2537


Explain what is the concatenation operator?

601


What is a good data structure to use for storing lines of text?

571


What happens if a header file is included twice?

564


How to explain the final year project as a fresher please answer with sample project

451


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2624


What is c mainly used for?

573