GATE CSE
First time here? Checkout the FAQ!
x
+3 votes
570 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 (76k points)  
edited by | 570 views

2 Answers

+13 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.4k points)  
selected by
+13 votes
B. It uses array to implement.
answered by Veteran (18.6k 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 Mar 2017
  1. rude

    5236 Points

  2. sh!va

    3054 Points

  3. Rahul Jain25

    2920 Points

  4. Kapil

    2732 Points

  5. Debashish Deka

    2602 Points

  6. 2018

    1574 Points

  7. Vignesh Sekar

    1430 Points

  8. Bikram

    1424 Points

  9. Akriti sood

    1420 Points

  10. Sanjay Sharma

    1128 Points

Monthly Topper: Rs. 500 gift card

21,549 questions
26,889 answers
61,248 comments
23,251 users