adspace
#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 Posted / 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 |
Post New Answer View All Answers
Hi i'm richa piplani applied for ATC(IT) if u have the syllabus & old question papers forward me.I will be very much thankful to you. piplani.richa@gmail.com and sonu_pips@yahoo.co.in
how to create user name stape by stape in cisco router {with command}
Please if anybody have Vizag Steel Entrance exam papers or atleast Pattern of exam.Then please forward to my email- id: :srikanth.avanthi@gmail.com
why c is called middle level langauge?
Please send me Sample papers National Informatics Centre (NIC) Programmer. I am giving this paper first time..so if any one have previous question papers send to manoj200.yadav@gmail.com. thnx in advance
If i update, insert or delete records in my view will it affect my base table?????
What is Campus selection process of patni at Adcet,Ashta at 24th dec 2010.Also give apti syllabus.
Hi All... PLease send me if anyone have "Information Security Officer" Aptitude papers. Please Mail me at mannusanghi@gmail.com
Why do you want to work here
why u r shifting from engineering to other field ?
need tcs questn papers from 2007 to 2009 plzzzmail to 9015.rama@gmail.com its urgent
hi , anyone plz end nic model papers to my id
when will the group1&group2 exams will be held
Hi, I am appearing for the ISRO exam for the post of Scientist/ Engineer to be held on 26th April,09. Can anyone help me regarding the same? I want to know about the exam pattern and the syllabus. If anyone could share your experience or sample papers for the same at khadhar786@rediffmail.com? It would be very useful for me. Thanks.
sir, please send me the last three years exam papers conducted by CPCL- RECRUITMENT EXAM FOR Recruitment of Engineer ELECTRICAL ENGINEERING. A Soon as possible. i would be greatfull to u