engineering recuitment IB JIO (Junior Intelligence Officer) Mock Test 2023 Programming and Data Structure Programming in C
What will be the output of the following program?
#include
void main()
{
int n,j;
n=func(6);
printf(“%d”, n);
}
func(int k)
{
if (k==2)
return 2;
else {
printf(“+”);
func(k-1);
}
}
1
++++2
2
++++++2
3
+++++
4
2