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

What is function prototype in c language?

1086


Do character constants represent numerical values?

1398


Explain the concept and use of type void.

1166


What is derived datatype in c?

1143


Can stdout be forced to print somewhere other than the screen?

1089


how to make a scientific calculater ?

2128


What is the translation phases used in c language?

1171


Which of these functions is safer to use : fgets(), gets()? Why?

1162


what will be the output for the following main() { printf("hi" "hello"); }

11163


What is a method in c?

1211


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2695


please explain every phase in the "SDLC" in the dotnet.

2668


What are loops c?

1102


What is dynamic variable in c?

1098


Tell us bitwise shift operators?

1145