Sail E0 Webinar
Question

What will be output if you compile following c code ?


#include<stdio.h>
int funct1(int a)
{
if(a)
return funct1(--a)+a;
else
return 0;
}
void main()
{
int a=7;
printf("%d",funct1(a));
}


Options:
A .  28
B .  21
C .  7
D .  None of these
Answer: Option A




Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers