Home > Back-end >  No parameters and return values without business function recursive will cause a stack overflow?
No parameters and return values without business function recursive will cause a stack overflow?

Time:10-22

No parameters and return values and business code function, don't set exit criteria, recursive calls will cause a stack overflow? Why is that?

CodePudding user response:

Possible because even if everything is good, the function is also the stack when the call overhead: before each call a function, to save the current stack,

CodePudding user response:

Sooner or later to learn C/C + + statements corresponding assembly instruction,

CodePudding user response:

Return address will take up the stack space, and win64 calling convention will be implied distribution of four parameters of stack space, even if the function is less than four parameters

CodePudding user response:

Some programming languages have a tail recursion, don't know if the c language
  • Related