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

What is the method to save data in stack data structure type?

1087


What is difference between %d and %i in c?

1241


What will be the outcome of the following conditional statement if the value of variable s is 10?

1294


When is a “switch” statement preferable over an “if” statement?

1151


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1137


Explain do array subscripts always start with zero?

1230


Can include files be nested?

1111


Explain how are portions of a program disabled in demo versions?

1122


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1088


How can you restore a redirected standard stream?

1124


What are the 5 types of organizational structures?

1077


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

1068


Difference between malloc() and calloc() function?

1201


while initialization of array why we use a[][2] why not a[2][]...?

2360


Can we assign integer value to char in c?

1254