#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;
}
Answer / Shalvendra Payal
[ "
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;
}
mainn{
printf("%d
",fn(7))" ]
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program to reverse a string using recursive function without using str functions.
what is routing protocals & routed protocals.
how you judge that your interview go good????
What is VAT Account determination ? and how we can map in SAP ?
multithreading??
What would be the difficulties with building a bridge that connects the UK and Canada?
What do you like and dislike about working for this organisation?
successful command to make linux system as router in redhat-+
is a student eligible to sit in the campus selection after getting 55% marks in class 12th.
hi to all,i done ccna,now im looking job,but it is very diffcult to get job in networking field,.........i dnt know what im doing wrongly,kindly help me and give the proper way...i have so much of interest in this field only
how to print a number in character(ex. 123= one twenty three)?
What is the difference between "type testing" and "product qualification"?
Civil Engineering (5086)
Mechanical Engineering (4453)
Electrical Engineering (16638)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)