GATE CSE
First time here? Checkout the FAQ!
x
+3 votes
680 views

Which data structure in a compiler is used for managing information about variables and their attributes?

  1. Abstract syntax tree
  2. Symbol table
  3. Semantic stack
  4. Parse table
asked in Compiler Design by Veteran (78.1k points)  
edited by | 680 views

2 Answers

+15 votes
Best answer
Symbol table is answer . It can be implemented by using array , hash table , tree and eve some time with the help of lInked list !
answered by Boss (9.7k points)  
selected by
+13 votes
B. It uses array to implement.
answered by Veteran (18.8k points)  
The symbol table is actually a array implementation.
It is Symbol Table only. Mostly implemented as Hash tables.
We use hash table instead of array in symbol table bcz in array we cant exceed the size of array .
can any one tell me if they ask symbol table is easily implemented by and options are 1. hash table 2. array what will be the answer??
@rajan obviously Hash table. as time complexity f searching inserting is O(1) using hash table.


Top Users Jul 2017
  1. Bikram

    3782 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1832 Points

  4. joshi_nitish

    1494 Points

  5. Arnab Bhadra

    1096 Points

  6. Arjun

    1054 Points

  7. Hemant Parihar

    1050 Points

  8. Shubhanshu

    972 Points

  9. Ahwan

    876 Points

  10. akash.dinkar12

    642 Points


23,953 questions
30,895 answers
70,108 comments
29,273 users