recategorized by
349 views

1 Answer

0 votes
0 votes

(D) A Symbol Table in programming is used for:

  1. Checking Type Compatibility: The symbol table stores the data type of identifiers, which is used during semantic analysis to check if the expressions and assignments are semantically correct.

  2. Suppressing Duplication of Error Messages: Symbol tables can help in managing errors. For instance, if a variable is declared twice, the symbol table can help detect this error and suppress duplicate error messages.

  3. Storage Allocation: The symbol table can store information about the memory locations of identifiers, which can be used for storage allocation

Related questions

1.1k
views
1 answers
0 votes
go_editor asked Mar 26, 2020
1,112 views
Which of the statements related to Compilers is wrong ?Lexical analysis is breaking the input into tokensSyntax analysis is for parsing the phraseSyntax analysis is for analyzing the semanticNone of these
393
views
2 answers
0 votes
go_editor asked Mar 26, 2020
393 views
Which of the following is the most general phase – structured grammar ?RegularContext – SensitiveContext freeNone of these
260
views
1 answers
0 votes
go_editor asked Mar 26, 2020
260 views
Which activity is not included in the first pass of two pass assemblers?Build the symbol tableConstruct the machine codeSeparate mnemonic opcode and operand fields.None of these
1.8k
views
1 answers
1 votes
Arjun asked Jul 2, 2019
1,762 views
Which data structure is used by the compiler for managing variables and their attributes?Binary treeLink listSymbol tableParse table