Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following pseudo-code. Assume that the language has one global scope, one scope per function and one scope for each braced code block. 1.
Consider the following pseudo-code. Assume that the language has one global scope, one scope per function and one scope for each braced code block. 1. (4 pts) Draw the symbol tables in separation for all the scopes in this program. Assume that each table contains two columns: name and type. 2. (2 pts) If the language uses static scoping rules, what's the expected output from the print statement? Justify your answer by showing the hierarchy of the symbol tables at the print statement. 3. (2 pts) If the language uses dynamic scoping rules, what's the expected output from the print statement? Justify your answer by showing the hierarchy of the symbol tables at the print statement
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started