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
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
What are comments and how do you insert it in a C program?
Do variables need to be initialized?
What is modifier & how many types of modifiers available in c?
How can you draw circles in C?
What should malloc(0) do?
Where does the name "C" come from, anyway?
Who invented bcpl language?
Explain how do you list files in a directory?
What is function what are the types of function?
Why do we use int main instead of void main in c?
Why is this loop always executing once?
What is structure in c language?
Explain what header files do I need in order to define the standard library functions I use?
What are structures and unions? State differencves between them.