0 votes 0 votes Consider the two given functions: int fun1(int x, int y) { if (y==0) return 0; return (x+fun2(x, y-1)); } int fun2(int x, int y) { if (x==0) return y; return fun2(x-1, x+y); } What will be the value returned by $\text{fun1}(4, 4)$ ____ Algorithms go-mockgate-1 numerical-answers identify-function recursion algorithms + – Ruturaj Mohanty asked Dec 27, 2018 edited Dec 27, 2023 by Hira Thakur Ruturaj Mohanty 1.0k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Subham Nagar commented Dec 31, 2018 reply Follow Share 17? 0 votes 0 votes aanchal008 commented Jan 6, 2019 reply Follow Share Answer must be 17 0 votes 0 votes Please log in or register to add a comment.
3 votes 3 votes f1(4,4)->4+f2(4,3)->f2(3,7)->f2(2,10)->f2(1,12)->f2(0,13) return 13 in f1()->4+13=17 Nilabja Sarkar answered Jan 6, 2019 Nilabja Sarkar comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes So return value of $\text{fun1}(4,4)= 17$ Hira Thakur answered Dec 2, 2021 Hira Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.