Sail E0 Webinar
Question

What will be output if you compile following c code ?


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


Options:
A .  Compile Error
B .  0
C .  7
D .  Infinite loop
Answer: Option B




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