Question: Which statements are true regarding the following code snippet? / / returns the factorial of a given number. / / for example, the factorial of
Which statements are true regarding the following code snippet?
returns the factorial of a given number.
for example, the factorial of is equal to
int factorialvint n
if return ;
return factorial ;
int factorialvint n
int result ;
for int ;;
result ;
return result;
A: factorialv is an example of recursion and uses more overhead compared to iteration
B: factorialv is an example of iteration and uses more overhead compared to recursion
C: factorialv is an example of recursion and uses less overhead compared to iteration
D: factorialv is an example of iteration and uses less overhead compared to recursion
All changes saved
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
