Consider the following C code: #include <stdio.h> int temp = 0; int fun(int x,…
PYQ UGC NET 2024
Consider the following C code:
#include <stdio.h>
int temp = 0;
int fun(int x, int y)
{
int z; temp++;
if (y==3) return(x*x*x);
else { z=fun(x, y/3); return(z*z*z); }
}
int main()
{
fun(4, 81);
printf("%d", temp);
}What will be the output of the above code?
- A.
3
- B.
4
- C.
5
- D.
6
Attempted by 166 students.
Sign up free to check your answer
Sign up freeLoading lesson…

