Apple Interview Question

How to detect stack overflow at runtime in C, when running a recursive Fibonacci functon

Interview Answer

Anonymous

Nov 23, 2014

define global static variable, in main to get the first stack address approx, then define local variable in the function and compare the diff between the addresses

4