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
What are pointers in C? Give an example where to illustrate their significance.
How can I read/write structures from/to data files?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Why string is used in c?
How can I run c program?
How to set file pointer to beginning c?
What are structural members?
What is the use of getch ()?
What does int main () mean?
Is main is user defined function?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What functions are used in dynamic memory allocation in c?
Define recursion in c.
What are two dimensional arrays alternatively called as?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.