0
What is the output of this code.
static int Fact(int num) { if (num == 5) { return 5; } return num * Fact(num - 120); }
1 Answer
+ 4
To keep the answer simple, if num=125, then output will be 625. Or if num equals some (x +125), you'll get a definite output. Otherwise it goes into infinite loop.