Direction: Consider the following recursive C function that takes two arguments unsigned into foo (unsigned int, n, unsigned int r) { if n > 0 return n% foo (n/r, r);
else return 0,
}
-
What is the return value of the function foo, when it is called as foo (345, 10)?
-
- 345
- 12
- 5
- 3
- 345
Correct Option: B
5 + 4 + 3 = 12