You are debugging a C program and notice that the program crashes after running for a few minutes. Upon investigation, you find that a recursive function is being called multiple times. What could be the most likely cause of the crash?

  • Hardware Failure
  • Infinite Loop
  • Memory Leak
  • Stack Overflow
The most likely cause of the crash in this scenario is a stack overflow. When a recursive function is called multiple times without a proper base case or termination condition, it can fill up the call stack, causing a stack overflow and program crash.
Add your answer
Loading...

Leave a comment

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