GATE CSE
First time here? Checkout the FAQ!
x
+3 votes
629 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 (77.3k points)  
edited by | 629 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.6k 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 May 2017
  1. akash.dinkar12

    3338 Points

  2. pawan kumarln

    2108 Points

  3. Bikram

    1922 Points

  4. sh!va

    1682 Points

  5. Arjun

    1614 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1208 Points

  8. Angkit

    1056 Points

  9. LeenSharma

    1018 Points

  10. Arnab Bhadra

    812 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    1008 Points

  2. pawan kumarln

    734 Points

  3. Arnab Bhadra

    726 Points

  4. Arjun

    342 Points

  5. bharti

    328 Points


22,893 questions
29,196 answers
65,302 comments
27,695 users