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

fn name and variable name are same it get overloaded..

by changing the variable name the ans will be: 9

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who is the founder of c language?

686


Explain spaghetti programming?

684


Explain About fork()?

647


What does #pragma once mean?

688


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

716






Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1497


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

685


explain how do you use macro?

667


Explain how do you determine the length of a string value that was stored in a variable?

670


What is the equivalent code of the following statement in WHILE LOOP format?

769


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1627


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2303


How do I determine whether a character is numeric, alphabetic, and so on?

622


Explain how can I manipulate strings of multibyte characters?

783


Is c easy to learn?

558