1 votes 1 votes Consider the following program. Assume that $x$ and $y$ are integers. f(x, y) { if (y != 0) return (x * f(x,y-1)); else return 1; } What is $f(6,3)?$ $243$ $729$ $125$ $216$ Algorithms cmi2020-datascience algorithms recursion identify-function + – soujanyareddy13 asked Jan 29, 2021 • recategorized Feb 12, 2021 by Arjun soujanyareddy13 613 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Solution: (D) is correct. This code computes $x^y$. f(6,3) will compute $6^3$ which is 216. LasyaReddy07 answered Feb 1, 2021 LasyaReddy07 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes The given code computes the value of $6^3 =216$. So Option $(D)$ is correct. Hira Thakur answered Feb 15, 2021 • edited Dec 2, 2021 by Hira Thakur Hira Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.