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


Please Help Members By Posting Answers For Below Questions

Is c is a middle level language?

591


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

569


What is pragma c?

601


What are data types in c language?

578


Do variables need to be initialized?

615






"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

601


Explain why can’t constant values be used to define an array’s initial size?

844


What is the benefit of using an enum rather than a #define constant?

644


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

724


What do the functions atoi(), itoa() and gcvt() do?

715


What is the use of header?

610


How can I trap or ignore keyboard interrupts like control-c?

605


What is self-referential structure in c programming?

646


What is call by value in c?

547


What is sizeof array?

600