Question: (cpp) Consider the following function and answer the questions that follow: int foo (int num1, int num2) { if (num2 == 0) return num1: else
(cpp)

Consider the following function and answer the questions that follow: int foo (int num1, int num2) { if (num2 == 0) return num1: else if (num2 > num1) return foo (num2, num1) else return foo (num 2: num1%num2): } a) What is/are the base case(s) of this function? b) What is/are the recursive step(s) of this function? c) What is the result of the function call foo (24, 84)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
