edited by
2,334 views
3 votes
3 votes

Which of the following are applications of symbol table?

  1. Storage allocation
  2. Checking type compatibility
  3. Suppressing duplicate error messages

Choose the correct answer from the options given below:

  1. $\text{(i)}$ and $\text{(ii)}$ only
  2. $\text{(i)}$ and $\text{(iii)}$ only
  3. $\text{(ii)}$ and $\text{(iii)}$ only
  4. $\text{(i)}$ $\text{(ii)}$ and $\text{(iii)}$

 

edited by

1 Answer

2 votes
2 votes

optio D all are correct 

https://www.slideshare.net/Tech_MX/symbol-table-design-compiler-construction

https://www.tutorialspoint.com/compiler_design/compiler_design_symbol_table.htm

Symbol table is an important data structure created and maintained by compilers in order to store information about the occurrence of various entities such as variable names, function names, objects, classes, interfaces, etc. Symbol table is used by both the analysis and the synthesis parts of a compiler.

A symbol table may serve the following purposes 

  • To store the names of all entities in a structured form at one place.

  • To verify if a variable has been declared.

  • To implement type checking, by verifying assignments and expressions in the source code are semantically correct.

  • To determine the scope of a name (scope resolution).

Answer:

Related questions

5 votes
5 votes
1 answer
1
go_editor asked Nov 20, 2020
7,510 views
Which of the following is not an intermediate code form?Syntax treesThree address codesQuadrupulesPost fix Notation
3 votes
3 votes
1 answer
2
0 votes
0 votes
1 answer
3
go_editor asked Mar 26, 2020
298 views
Symbol Table can be used for :Checking type compatibilitySuppressing duplication of error messageStorage allocationAll of these
1 votes
1 votes
1 answer
4
Arjun asked Jul 2, 2019
1,672 views
Which data structure is used by the compiler for managing variables and their attributes?Binary treeLink listSymbol tableParse table