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 format specifier for printing a pointer value?

1023


What is the maximum no. of arguments that can be given in a command line in C.?

1154


Why can’t we compare structures?

1275


What is the difference between union and anonymous union?

1306


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

1438


How many header files are in c?

1038


What is the right type to use for boolean values in c? Is there a standard type?

1016


How do you define a string?

1103


What are the standard predefined macros?

1146


What are keywords c?

1032


What is a global variable in c?

1013


What does & mean in scanf?

1111


What is the difference between declaring a variable and defining a variable?

1280


What is the difference between scanf and fscanf?

1268


How can I make it pause before closing the program output window?

1043