Consider the following statements: 1. A programming language that does not…

Consider the following statements:

1. A programming language that does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion, can be implemented with static storage allocation.

2. A multi-level access-link or display arrangement is needed for activation records only if the programming language being implemented has nesting of procedures/functions.

3. Recursion in programming languages cannot be implemented with dynamic storage allocation.

4. Nesting of procedures/functions and recursion require dynamic heap allocation and cannot be implemented with a stack-based allocation scheme for activation records.

5. Programming languages that permit a function to return another function as a first-class result cannot, in general, be implemented using only a stack-based storage-allocation scheme for activation records.

How many of the above statements are true?

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…