recursion main( fib( fib( fib( fib( fib( fib( fib( fib( fib( fib( fib( fib( fib( fib( fib( figure recursive call tree for fib( the run time stack each time function is calledan activation record is automatically created in order to maintain information related to the function one piece of information is the return address this is the location of the next instruction to be executed when the function terminates thuswhen function returnsthe address is obtained from the activation record and the flow execution can return to where it left off before the function was called the activation records also include storage space for the allocation of local variables remembera variable created within function is local to that function and is said to have local scope local variables are created when function begins execution and are destroyed when the function terminates the lifetime of local variable is the duration of the function in which it was created an activation record is created per function callnot on per function basis when function is calledan activation record is created for that call and when it terminates the activation record is destroyed the system must manage the collection of activation records and remember the order in which they were created the latter is necessary to allow the system to backtrack or return to the next statement in the previous function when an invoked function terminates it does this by storing the activation records on run time stack the run time stack is just like the stack structure presented in but it' hidden from the programmer and is automatically maintained consider the execution of the following code segmentwhich uses the factorial function defined earlierdef main() fact main(