Question: Consider the following program in an unspecified language: var x = 3 def f ( ) { print ( f: x = +
Consider the following program in an unspecified language:
var x
def f
printf: x x
g
h
printf: x x
def g
var x
printg: x x
h
def h
printh: x x
f
What is printed when running this program using a static scoping; and b dynamic scoping?
Options:
Static scoping: f: g: h: h: f: Dynamic scoping: f: g: h: h: f:
Static scoping: f: g: h: h: f: Dynamic scoping: f: g: h: h: f:
Static scoping: f: g: h: h: f: Dynamic scoping: f: g: h: h: f:
Static scoping: f: g: h: h: f: Dynamic scoping: f: g: h: h: f:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
