Similar questions 4 more →
Runtime Environments & Parameter Passing


Answer & solution
Answer: C: PARAM and Q (no official key was published)
Lexical lookup in P finds its local m before reaching the enclosing declaration, so unqualified m there denotes the local variable. In Q, which has no local m, lookup reaches the global declaration in PARAM. The same global name is visible in the main block itself. Hence PARAM and Q are the regions of direct visibility, C. The global object can still be accessed indirectly through P’s reference parameters; object accessibility is distinct from whether its identifier is shadowed.