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...

Evaluate:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);

a) 10
b) 11
c) 1

Answer Posted / rajesh

b

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a volatile variable in c++?

1356


What is lambda expression c++?

997


What can I use instead of namespace std?

1070


How did c++ get its name?

969


If dog is a friend of boy, is boy a friend of dog?

928


Explain bubble sorting.

1021


What is the use of main function in c++?

924


How can you link a c++ program to c functions?

1058


what are Access specifiers in C++ class? What are the types?

1143


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1955


Can c++ do everything c can?

998


What are different types of loops in c++?

1070


Give example of a pure virtual function in c++?

1082


how to explain our contribution in the project?

3635


Comment on local and global scope of a variable.

1083