C program code
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 / madhu
if (n<=1)
zap = 1;
it gives a compile time error invlaid l value assignment.
zap is a function and cannot be assigned a value
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
When was c language developed?
What is the acronym for ansi?
What is void main ()?
Does c have class?
What is string function c?
Is it possible to initialize a variable at the time it was declared?
Why do we use pointer to pointer in c?
What does the format %10.2 mean when included in a printf statement?
What is 02d in c?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
When should volatile modifier be used?
all c language question
What are the modifiers available in c programming language?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Where can I get an ansi-compatible lint?