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

9

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

647


What is I ++ in c programming?

629


What is c standard library?

693


how to create duplicate link list using C???

2076


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1469






Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2650


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3127


What is file in c preprocessor?

654


How can you tell whether a program was compiled using c versus c++?

620


What is the difference between array and pointer?

570


What is console in c language?

611


What are data types in c language?

587


Are enumerations really portable?

596


write a program to rearrange the array such way that all even elements should come first and next come odd

1765


Why does notstrcat(string, "!");Work?

644