Multiple choice

In a perfectly designed compiler and perfectly coded program, a system error, i.e. memory insufficiency occurs while executing a recursive function call and execution of the program is terminated. What is the reason behind the occurence of this error?

  1. Compiler

  2. Program, since queue entries are overflowed

  3. Stack overflow

  4. Number of stacks assigned to this program crossed the maximum limit assigned to compiler

  5. Symbol table over flow

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Every call to a recursive program creates a local stack of desired length. But if recursive function calls itself with in the function then another stack is crated for second call and this goes on as long as the recursive function call itself without completing it self. In the given prohram , the condition to close the recursion is not set and so the function is called endlessly. This situation has caused the error of insufficient memory, since no more space is available for new stack.