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

Discussion

The nesting depth recorded in a symbol table entry is used to

  • A.compute the number of bytes the name occupies
  • B.determine how many access links to follow at run time
  • C.decide the order in which the entries are hashed
  • D.select which pass of the compiler will process the name

Answer: B

Correct answer: determine how many access links to follow at run time

The difference between the nesting depth of the use and that of the declaration is exactly the number of links to traverse, and the compiler computes it from the two symbol table entries. That is why the depth is recorded: it turns a run-time search into a fixed number of pointer dereferences known at compile time.

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

Post your comment

Please log in or register to post a comment.