Machine-translated by Google. Questions are authored in English.
Top

Discussion

When a scope is exited, the symbol table entries for that scope are

  • A.converted into intermediate code by the generator
  • B.removed or hidden so the enclosing declarations become visible again
  • C.written out to a file for use by the linker later on
  • D.left in place permanently

Answer: B

Correct answer: removed or hidden so the enclosing declarations become visible again

A name declared in an inner scope must cease to be visible when that scope ends, and any outer declaration it concealed must become visible again.

The usual implementation is a stack of scopes, pushed on entry and popped on exit, or a chain of entries per name from which the innermost is unlinked. The entries may survive if debugging information needs them, but they are removed from the visible set - which is what scope means.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.