Symbol Table Representation
Symbol table have the following attributes:
- Data- Types
- Name of the Variable
- Scope
- Address/Location/ Offset
- Storage Class
- Other Information
Example:
main() { Static int a; Float f; fact(); }
| S.No | Name | Type | Storage class | Location | Scope |
| 1 | a | int | static | 5000 | main |
| 2 | f | float | auto | 5004 | main |
| 3 | fact | function | – | 5008 | – |
The symbol table can be represented in 2 ways:
- Fixed Length
- Variable Length
Example:
Int a, b, c, sum; Float percentage; Void readdate(); --- --- ---
Reference Link
