How does the execution stack change when a recursive function is called in C?

  • A new thread is created
  • Each function call adds a new stack frame
  • The stack remains unchanged
  • The stack shrinks
In C, when a recursive function is called, each function call adds a new stack frame to the execution stack. These stack frames store the local variables and return addresses for each function call. This process continues until the base case is reached.
Add your answer
Loading...

Leave a comment

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