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
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 |
How can you convert integers to binary or hexadecimal?
second highest number in a given set of numbers
How to receive strings with spaces in scanf()
Calculate 1*2*3*____*n using recursive function??
What are the types of c language?
What is output redirection?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What is the difference between GETS();AND SCANF();
What are inbuilt functions in c?
How can a program be made to print the name of a source file where an error occurs?
write a program in c to read array check element is present or not?
Why is it important to memset a variable, immediately after allocating memory to it ?