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
What is the difference between a pointer and a link in c ++?
Do you know the use of vtable?
What is the difference between delegation and implemented-in-terms-of?
What is the latest version on c++?
Define 'std'.
Is c++ a pure oop language?
Differentiate between a constructor and a method in C++.
Write about c++ storage classes?
What is the most useful programming language?
What is array give example?
What is a forward referencing and when should it be used?
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
What is double in c++?
Explain the advantages of using friend classes.