Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

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,
}

  1. What is the return value of the function foo, when it is called as foo (513, 2)?
    1. 9
    2. 8
    3. 5
    4. 2
Correct Option: D


1 + 1 = 2



Your comments will be displayed only after manual approval.