0 votes 0 votes What does fun2() do in general? int fun(int x, int y) { if (y == 0) return 0; return (x + fun(x, y-1)); } int fun2(int a, int b) { if (b == 0) return 1; return fun(a, fun2(a, b-1)); } Niks55 asked Oct 2, 2018 Niks55 378 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply ank73811 commented Oct 2, 2018 reply Follow Share power function i.e ab. 0 votes 0 votes Niks55 commented Oct 2, 2018 reply Follow Share How?! 0 votes 0 votes Shaik Masthan commented Oct 3, 2018 reply Follow Share Note that, fun(a,b) returns a*b as output fun2(a,b) = fun (a,fun2(a,b-1)) = a * fun2(a,b-1) --------------> (1) = a* fun(a,fun2(a,b-2)) = a * a * fun2(a,b-2) --------------> (2) from 1 and 2, you can generalize, it as ab. 0 votes 0 votes Please log in or register to add a comment.