Ask Question
24 April, 21:07

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?

+3
Answers (1)
  1. 24 April, 23:32
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers