Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

C program code

int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15

Answer Posted / manishsoni

int zap(int n)
{
int a;
if(n<=1)
a=1;
else
a=zap(n-3)+zap(n-1);
return a;
}
main()
{
int result;
result=zap(6);
printf("%d",result);
getch();
}
it gives us 9;
Manish soni(MoNu)

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between exit() and _exit() function?

1158


What is sizeof return in c?

1020


what is stack , heap ,code segment,and data segment

2682


What does a pointer variable always consist of?

1085


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2244


How can I convert a number to a string?

1140


What is struct node in c?

1058


Why c is a mother language?

1008


Why we use stdio h in c?

1014


Once I have used freopen, how can I get the original stdout (or stdin) back?

1062


What is difference between union All statement and Union?

1100


What are the different types of control structures in programming?

1113


Why we not create function inside function.

2175


Explain data types & how many data types supported by c?

1069


What is the meaning of c in c language?

1141