Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can you determine the size of an allocated portion of memory?

1235


Write a program to print all permutations of a given string.

1125


What is exit() function?

964


What will be your course of action for a push operation?

1047


Why is struct padding needed?

1025


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1128


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1954


Give basis knowledge of web designing ...

1979


program for reversing a selected line word by word when multiple lines are given without using strrev

2418


write a program to concatenation the string using switch case?

2029


List some of the dynamic data structures in C?

1188


write a program to generate address labels using structures?

4517


What are the different types of endless loops?

1026


What are the 4 types of unions?

983


how is the examination pattern?

1960