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 / hemavathiarun
Hi all,
since the code is calling the same function with different
values,it's not at all possible to move to printf statement
until x becomes < 0
so only when the compiler gets the value of x as 0 the loop
will be stopped.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How can you determine the size of an allocated portion of memory?
Write a program to print all permutations of a given string.
What is exit() function?
What will be your course of action for a push operation?
Why is struct padding needed?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
Give basis knowledge of web designing ...
program for reversing a selected line word by word when multiple lines are given without using strrev
write a program to concatenation the string using switch case?
List some of the dynamic data structures in C?
write a program to generate address labels using structures?
What are the different types of endless loops?
What are the 4 types of unions?
how is the examination pattern?