Similar questions 2 more →
Runtime Environments & Parameter Passing


Answer & solution
Answer: C: 0.25,0.125 (no official key was published)
Dynamic lookup searches active calling environments. In the first show call, no nearer local x is active, so the global value 0.25 is printed. In the second call, small is the active caller and its local x=0.125 is the nearest binding, so show prints 0.125. Thus C. Under lexical scope, show’s definition outside small would instead resolve both calls to the global binding; the explicit dynamic-scoping premise is therefore essential.