1
In the code below, in line 5, the function foo1t
calls the function foo1
passing two parameters to it, however, the function foo1
has only one parameter. Is it possible to do this or the code is wrong? If possible, I would like an explanation.
1 int foo1t(int n, int resp) {
2 if (n <= 1) {
3 return resp;
4 } else {
5 return foo1(n-1, n*resp);
6 }
7 }
8
9 int foo1(int n) {
10 return foo1t(n, 1);
11 }