In Fortran 77, local variables were typically allocated statically. In Algol and its descendants (e.g., Ada and C), they are typically allocated in the stack. In Lisp they are typically allocated at least partially in the heap. What accounts for these differences? Give an example of a program in Ada or C that would not work correctly if local variables were allocated statically. Give an example of a program in Scheme or Common Lisp that would not work correctly if local variables were allocated on the stack.
In Fortran 77, local variables are typically allocated statically.In Algol and its descendants (e.g., Pascal and Ada), they are typically allocated in the stack.In Lisp they are typically allocated at least partially in the heap.Give an example of a program in Pascal or Ada that would not work correctly if local variables were allocated statically.Give an example of a program in Scheme or Common Lisp that would not work correctly if local variables were allocated on the stack.
Get Answers For Free
Most questions answered within 1 hours.