#include<stdio.h>
int fn(int v);
main()
{

printf("%d\n",fn(7));
}
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;
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Engineering AllOther Interview Questions

wat r aptitude ques askd in TCS??

1 Answers   TCS,


computer is male or female.....???

0 Answers  


What is the importance of object oriented modeling in various approaches used in engineering

1 Answers  


model question papers of GrayOrange company

0 Answers   Orange,


a steel bar 1' inch square 6' long is to be used as a column.ends are free to rotate put may not be displaced.stress is limited to 30,000 PSI

0 Answers  


MES NEW DELHI

1 Answers   MES,


hai im going to face ibps SO IT officers grade 1 interview. if anyone had an idea plz tel me expected and experienced questions and mail to anusha_k_anu@yahoo.com

0 Answers  


if a customer's blackberry stopped syncing their calendar wirelessly what would you do?if a customber deleted mail from his blackberry but it did delete from his mailbox how would ypu resolve this

0 Answers  


how strcpy usingrecursive function

0 Answers  


main() { int a=10,b; b=a>=5?100:200; printf("%d\n",b); }

1 Answers   Vector,


Create an midp application which examines that a phone number which has enters is in the given format * Area code should be one of the following:040,041,050,0400,044

0 Answers  


10. Each alphabet stands for one digit in the following multiplication. T H I S x I S --------- X F X X X X U X ------------ X X N X X ------------ What is the maximum value T can take?

4 Answers   eLitmus, Infosys, Verchaska,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4452)
  • Electrical Engineering Interview Questions Electrical Engineering (16637)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)