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 is structure packing in c?
What is the scope of static variable in c?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What is the difference between text and binary i/o?
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.
How can I change the size of the dynamically allocated array?
what will be the output for the following main() { printf("hi" "hello"); }
Explain how can I make sure that my program is the only one accessing a file?
What is c system32 taskhostw exe?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is the difference between break and continue?
what is use of malloc and calloc?
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 is the purpose of ftell?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above