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 the sizeof () a pointer?

991


Why c is called a mid level programming language?

1069


Are pointers integer?

1012


What are the different types of linkage exist in c?

1033


What is the purpose of void in c?

1067


Explain what are the __date__ and __time__ preprocessor commands?

1118


What is the purpose of macro in C language?

1116


Can you define which header file to include at compile time?

1022


I heard that you have to include stdio.h before calling printf. Why?

1064


What is the difference between array and pointer?

1017


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

1010


What are the different types of errors?

1138


What are the benefits of c language?

1176


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

1102


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1161