Ask Question
29 November, 02:01

What problem can occur when a programmer fails to specify the base case or to reduce the size of the problem in a way that terminates the recursive process?

+4
Answers (1)
  1. 29 November, 04:14
    0
    Inifinite loop will occur.

    Explanation:

    For instance the code block below will result in an infinite loop:

    int prev (x) {

    Return prev (x-1);

    }

    The base case is what determine when the function should stop calling itself; if it is absent, infinite loop will occur.

    In the above code, a base case of when x = 0 or x = 1 should have been added to avoid the infinite loop.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What problem can occur when a programmer fails to specify the base case or to reduce the size of the problem in a way that terminates the ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers