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

Discussion

Scope determines

  • A.the sequence in which the compiler works through its phases
  • B.the type that will be inferred for a name that was never declared
  • C.the region of the program in which a declaration is visible
  • D.the amount of storage a declared variable occupies

Answer: C

Correct answer: the region of the program in which a declaration is visible

Scope is a textual region in a statically scoped language: the block in which the declaration appears, less any inner block redeclaring the same name. It determines which declaration a use refers to, and it is what the symbol table’s nesting machinery exists to represent.

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

Post your comment

Please log in or register to post a comment.