Google Search

Sunday, June 5, 2011

SYMBOL TABLE:Write a program in C to implement the symbol table.


SYMBOL TABLE

Aim:    To Write a program in C to implement the symbol table.

Algorithm:

  1. Create a structure having member variable and values.
  2. Display the options and get choice from user.
  3. If choice 1 call create.
  4. If choice 2 call insert.
  5. If choice 3 call modify
  6. If choice 4 call search.
  7. If choice 5 call display.
  8. Exit.
  9. Create()
            Do till I less than 3.
            Get input from the user for variables and values.

10      Insert()

            Get number of records to insert.
10.1.1 Do till i   is less than  sum of  I and number of recors to insert.
10.2  Get input for symbol name and value

11      Modify()

            Get record or symbol name to modify.
             If it is equal to any symbol name then print record found else print record not fund.
            Get the value for corresponding symbol name.

12      Search()
            Get the symbol name to modify.
            If it is present in table then  print record found else print record not found.

13      Display()

            Do till k is less than total number of records.
            Print the symbol names and values..




0 comments:

Post a Comment