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 / deepa
error there is no keyword as then ,therefore it will
treat 'then' as a variable which wud lead it to compilation
error
| Is This Answer Correct ? | 15 Yes | 8 No |
Post New Answer View All Answers
Explain what is the use of a semicolon (;) at the end of every program statement?
What is meant by realloc()?
What language is windows 1.0 written?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
What are the application of void data type in c?
How #define works?
What are disadvantages of C language.
What does d mean?
How do I use void main?
What is the difference between int main and void main in c?
What is boolean in c?
What is the difference between single charater constant and string constant?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
What are the 3 types of structures?
Explain that why C is procedural?