#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

Write a function that responds to a click anywhere on the page by displaying an alert dialog. Display the event name if the user held Shift during the mouse click. Display the element name that triggered the event if the user held Ctrl during the mouse click. (Answer in Java Language)

2 Answers   Infosys,


I have Cleared Bank of India Clerical Examination.I just want to know how to prepare for interview and what are the parriculars that I have to submit......Pls someone help me with it

0 Answers  


Hi All... PLease send me if anyone have "Information Security Officer" Aptitude papers. Please Mail me at mannusanghi@gmail.com

0 Answers  


how to create user name stape by stape in cisco router {with command}

0 Answers  


. Give the C language equivalents of the following a)Function returning an int pointer b)Function pointer returning an int pointer c)Function pointer returning an array of integers d)Array of function pointer returning an array of integers

0 Answers   Geometric Software,


Can you delink a payer from a bill to sold to ship to and then create a new payer on the existing bill to sold to ship to, this is where a pub or club changes licencees and we want to icolate the debt from the old owner but keep the sales history on the ship to/sold to

0 Answers   BOC,


I need a last 3 years question paper for RRB exam,post of section engineer(computer science)

1 Answers   RRB,


defference between menu and context menu in vb.net?

0 Answers  


Can a generic class extend another generic class??

0 Answers  


is the meter head is same as back pressure?

0 Answers   GDex,


i am shortlisted in corporation bank for the post of computer officer the next phase is group discussion. i want to know how to prepare and what about the topics for preparing thanking you if you have any suggestion please give me prabhatmishra21@rediffmail.com

0 Answers   Corporation Bank, State Bank Of India SBI,


Please send me the ongc old question papers

0 Answers  


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