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

error there is no keyword as then ,therefore it will
treat 'then' as a variable which wud lead it to compilation
error

Is This Answer Correct ?    15 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is uint8 in c?

650


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1502


What is pragma in c?

637


What is a pointer variable in c language?

649


Wt are the Buses in C Language

2759






What are control structures? What are the different types?

609


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5067


Why flag is used in c?

659


How variables are declared in c?

578


What is the code for 3 questions and answer check in VisualBasic.Net?

1697


How can I direct output to the printer?

827


regarding pointers concept

1582


what is a constant pointer in C

686


What are pointers? What are stacks and queues?

586


pierrot's divisor program using c or c++ code

1736