What will be the output of the following C code? #include<stdio.h> int fun(int…
PYQ Hexaware Hiring Assessment 2023PYQ CoCubes 2023
What will be the output of the following C code?
#include<stdio.h>
int fun(int x, int y);
int main()
{
int i,n;
i=5;
n=7;
int f = fun(5,7);
printf("%d", f);
}
int fun(int x, int y)
{
if(x<=0)
return y;
else
return(fun(x-1,y-1));
}- A.
0
- B.
1
- C.
2
- D.
3
Attempted by 48 students.
Sign up free to check your answer
Sign up freeLoading lesson…

