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 / guest

b

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are global variables and explain how do you declare them?

624


What are the valid places to have keyword “break”?

642


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1505


Create a simple code fragment that will swap the values of two variables num1 and num2.

795


What is union and structure in c?

600






Write a program to generate the Fibinocci Series

650


What is the meaning of ?

595


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1445


What are pragmas and what are they good for?

561


What are the types of c language?

539


What is pointer and structure in c?

554


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

697


For what purpose null pointer used?

592


Who developed c language?

626


#include { printf("Hello"); } how compile time affects when we add additional header file .

1412