Consider the following pseudocode: What does this programprint if the language uses static scoping? What does it

Question:

Consider the following pseudocode:
x: integer -- global procedure set xln : integer) x:= n procedure print.x() write.integer(x) procedure firstl) setx(1) print xl) procedure second() x : integer setx(2) print x() setx(0) first() print.x() second() print.x()What does this programprint if the language uses static scoping? What does it print with dynamic scoping? Why?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: