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

Answers were Sorted based on User's Feedback



int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / sindhu

shobha is correct.

Is This Answer Correct ?    6 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / shobha

ans is 9

Is This Answer Correct ?    4 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / hussain reddy

9

Is This Answer Correct ?    2 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / mannucse

a

Is This Answer Correct ?    2 Yes 1 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / tej

ans is 9

Is This Answer Correct ?    1 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

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

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / ravinderreddy

ans: b

Is This Answer Correct ?    0 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / sundar

8

Is This Answer Correct ?    0 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / vint

Ans: 9

Is This Answer Correct ?    0 Yes 0 No

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the..

Answer / arunthathi

sindhu is correct

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

0 Answers  


wats SIZE_T meant for?

1 Answers  


1,4,8,13,21,30,36,45,54,63,73,?,?.

10 Answers   AMB, Franklin Templeton,


How do you access command-line arguments?

1 Answers  


write a 'c' program to sum the number of integer values

8 Answers  






How Many Header Files in c?

2 Answers   TCS,


What is the correct declaration of main?

0 Answers  


Why we use int main and void main?

0 Answers  


what is diff b/w huge & far & near pointer??

1 Answers   HCL,


Is c language still used?

0 Answers  


Explain how can I convert a number to a string?

0 Answers  


What is a double c?

0 Answers  


Categories