This question came up in an exam I had.
The answer is 120 can someone explain to me how this is?
Q.
What is the output of this program?
Code:#include <stdio.h> #include <stdlib.h> int func(int x); int main() { int x = 5; x = func(x); printf("%d \n", x); } int func(int x) { if(x > 1) return x*func(x-1); return 1; }