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

fn name and variable name are same it get overloaded..

by changing the variable name the ans will be: 9

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the heap?

618


When should the register modifier be used? Does it really help?

607


explain what is a newline escape sequence?

682


Write a program to implement queue.

661


Why is c so powerful?

679






What are the 4 types of functions?

566


What is auto keyword in c?

787


What standard functions are available to manipulate strings?

558


What is main () in c language?

590


What is the meaning of c in c language?

592


What does void main () mean?

729


What does void main return?

598


What are pointers in C? Give an example where to illustrate their significance.

746


What is the difference between array and pointer in c?

575


What does malloc () calloc () realloc () free () do?

556