int func1 (int m, int n) { if (m==n || n==1) return 1; else return func1(m-1,n-1
ID: 3615746 • Letter: I
Question
int func1 (int m, int n) {if (m==n || n==1)
return 1;
else
return func1(m-1,n-1) + n*func1(m-1,n);
}
Based on the function above;
a) What precondition must exist in order to prevent the code abovefrom infinite recursion?
a. m >= 0 and n >=0 b. m >= 0 andn>= 1
c. m >= 1 and n >=0 d. m >= 1 andn >= 1
b) Which of the following function calls would result in the value1 being returned?
a. func1(0,1) b. func1(1,0)
c. func1(2,0) d. func1(1,2)
c) Which of the following would be an invalid call to the functionabove?
a. func1(0,1) b. func1(1,0)
c. func1(4,9) d. func1(99999,99999)
feel free to answer in multiple posts