Question: 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 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.
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
Fortran 77 lacks recursion so there can never be more than one live instance of the local variables ... View full answer
Get step-by-step solutions from verified subject matter experts
