GATE CSE
First time here? Checkout the FAQ!
x
+3 votes
534 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 (75.6k points)  
edited by | 534 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.3k points)  
selected by
+13 votes
B. It uses array to implement.
answered by Veteran (18.7k 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 Feb 2017
  1. Arjun

    5386 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3952 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2564 Points

  6. sriv_shubham

    2318 Points

  7. Smriti012

    2240 Points

  8. Arnabi

    2008 Points

  9. mcjoshi

    1696 Points

  10. sh!va

    1684 Points

Monthly Topper: Rs. 500 gift card

20,863 questions
26,022 answers
59,696 comments
22,133 users