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

What should malloc(0) do?

619


What is the 'named constructor idiom'?

645


What would be an example of a structure analogous to structure c?

579


why return type of main is not necessary in linux

1710


Write a code to remove duplicates in a string.

633






What are header files and explain what are its uses in c programming?

618


What are the functions to open and close the file in c language?

597


Explain how can I manipulate strings of multibyte characters?

788


Do pointers take up memory?

666


Why do we need a structure?

597


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

636


What are structural members?

577


What is difference between static and global variable in c?

543


What are pointers in C? Give an example where to illustrate their significance.

754


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

617