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

why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

653


What is the size of array float a(10)?

666


What are the features of the c language?

656


How can I handle floating-point exceptions gracefully?

643


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1275






Why is c faster?

602


List some of the static data structures in C?

768


Why is structure important for a child?

613


string reverse using recursion

1823


What is the difference between NULL and NUL?

737


how we can make 3d venturing graphics on outer interface

4030


What is array of structure in c programming?

761


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

3700


What is the purpose of sprintf?

629


What is volatile variable how do you declare it?

576