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 the following:
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);




1) 10


2) 11


3) 1

Answer Posted / harish

11

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

show how link list can be used to repersent the following polynomial i) 5x+2

2230


How would you obtain the current time and difference between two times?

1254


What does *p++ do?

997


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

3027


What is a 'null pointer assignment' error?

1186


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3661


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1689


What are pointers?

1075


What does the file stdio.h contain?

1023


swap 2 numbers without using third variable?

1095


What is the role of this pointer?

1023


What is operator promotion?

1029


What is meant by errors and debugging?

1081


What is wild pointer in c?

1038


What are c identifiers?

1065