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
How can I find out if there are characters available for reading?
How can I direct output to the printer?
Can a program have two main functions?
Can you assign a different address to an array tag?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What does void main return?
Why we use break in c?
What is string concatenation in c?
Is array name a pointer?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is a stream water?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What is printf () in c?
how is the examination pattern?
What is dynamic variable in c?