#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

Whatis Bandwidth?

2 Answers   Elgi Equipments,


explain different access specifiers in class

0 Answers  


What is a computer without a hard disk called as technically ?

1 Answers  


how will u test the idoc

0 Answers   HCL,


what is meant by safety in construction?

3 Answers   CAE,






explain software engineering practices

0 Answers  


how to cable size by Amp with example

0 Answers   Uniflex,


how to conrtruct gear make him rotate on its axis

0 Answers  


how to count number of 3's in 100

0 Answers   Educomp,


i mdoing btech and i have two choices either i choose software eng or do multimedia eng so which one has better scope

1 Answers  


main() { int y=10; if(y++>9 && y++!=10 && y++>10) { printf("%d",y); else printf("%d",y); } }

4 Answers   Wipro,


What is Landscape in Sap BW?

0 Answers  


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)