QuestionQ40

VerifiedFunctions and Exceptions

What does the following code snippet output?

Question Image

Explanation

The function decreases y by 1 on each recursive call until y equals x. Starting with func(0, 3), it reaches func(0, 0), returns 0, and print displays 0.

Community Discussion

No comments yet. Be the first to start the discussion!