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 / guest

9

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1487


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1577


Write a program to use switch statement.

658


Difference between Shallow copy and Deep copy?

1571


What is malloc() function?

638






Tell me what are bitwise shift operators?

658


How to delete a node from linked list w/o using collectons?

2089


What is the difference between call by value and call by reference in c?

619


The statement, int(*x[]) () what does in indicate?

647


write an algorithm to display a square matrix.

2223


Are there namespaces in c?

568


Is there a way to switch on strings?

619


What is an endless loop?

802


What is #include stdlib h?

616


Explain what is a 'locale'?

585