#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

in single linked list , each node contains data and address of next node. if middle of list the node is damaged/crashed then how to find where the link is failed and how to get the all the data which is stored after the crashed node?

0 Answers  


can i learn ad. java without learned core java? java is best or .net is best for summer training?

0 Answers  


what is different between static block and public static void main??

0 Answers   HCL,


Why there is Powerfactor difference when we compare to our Capacitive Panel and TNEB side?

0 Answers   LM Glasfiber,


Hi I am Krushna.I have already applied for PO post in Syndicate Bank.Can anybody send me the sample paper for Syndicate bank PO.

0 Answers  






what is dedicated earthing??????

3 Answers   APC, ElectroMech, Emerson, JLL, JP Group, Tata Liebert,


Whats the difference between following two array declaration in JAVA? int a[]={1,2,3,4,5}; int []a-{1,2,3,4,5};

0 Answers  


i want what are the subjects that are in group1 exams. plz send me the subjects.

1 Answers  


what is e-bum.

0 Answers   TCS,


minimum percentage in B.E in(INFORMATION TECHNOLOGY) to be eligible for IES exam qualification and also for reserved categories.are IT engineers are eligible for giving IES exams? please reply soon.

0 Answers  


How can I boldly face the interview? Request:I am eagerly waiting for your replay.

0 Answers   Microsoft,


what is the significance of partial derivatives.

1 Answers   MPSC, TCS,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • 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)