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

Discussion

In a compiler, the data structure responsible for the management of information about variables and their attributes is

  • A.Semantic stack
  • B.Parser table
  • C.Symbol table
  • D.Abstract syntax-tree

Answer: C

The data structure is the symbol table.

The symbol table records every identifier in the program together with its attributes: type, scope, storage location, and for functions the number and types of parameters. Every phase of the compiler consults or updates it.

A parser table drives the parsing decisions, a semantic stack holds values during syntax-directed translation, and an abstract syntax tree represents the program's structure, not the attributes of its variables.

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

Post your comment

Please log in or register to post a comment.