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 |
What is identifiers in c with examples?
How can I write a function that takes a format string and a variable number of arguments?
what is difference between userlevel threads and kernel level threads ?what are the trades offs between these two approaches ? what approach is most frequently used and why ?
Can an array be an Ivalue?
what is the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (ā%d\nā,j); }
Why is c so important?
write a own function to compare two strings with out using stringcomparition function?
int n=1; while(1) { switch(n) { case 1:printf("a"); n++; continue; case 2:printf("b"); n++; continue; default : printf("c"); break; } break; }
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
Give the Output : * * * * * * * * * *
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
How are variables declared in c?