Question: Question 3 ( 4+2+2=8 points ) Consider the following pseudo-code. Assume that the language has one global scope, one scope per function and one scope

 Question 3 ( 4+2+2=8 points ) Consider the following pseudo-code. Assume

Question 3 ( 4+2+2=8 points ) 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!