In a recursive function, if the base case is not properly defined, it can lead to a ________.

  • Compilation Error
  • Infinite Loop
  • Memory Leak
  • Stack Overflow
When the base case in a recursive function is not properly defined, it can lead to a stack overflow error. A stack overflow occurs when the function calls itself indefinitely, filling up the call stack. This results in a runtime error.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *