Teaching Haryana (HPSC) Assistant Professor Mock Test 2025 Programming and Data Structure Programming in C Function Recursion
Consider the following C code:
int fun(int n)
{
int i=2;
while(n%i!=0)
i++;
printf("%d ", i);
if(n==i)
return 0;
else
fun(n/i);
}
The output of the fun(345) is
1
3 4 5
2
5 4 3
3
3 5 23
4
5 4 1
5
Question Not Attempted