Q21
NATMarks unknownConsider the following recursive function: function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n-1) + fib(n-2) end; The above function is run on a computer with a stack of bytes. Assuming that only return address and parameter are passed on the stack, and that an integer value and an address takes bytes each, estimate the maximum value of for which the stack will not overflow. Give reasons for your answer.
Sign in to save attempts.
Loading…