Question

    What is the purpose of a symbol table in lexical analysis?

    A Storing intermediate code Correct Answer Incorrect Answer
    B Managing memory allocation Correct Answer Incorrect Answer
    C Maintaining a list of used keywords Correct Answer Incorrect Answer
    D Storing information about identifiers Correct Answer Incorrect Answer
    E None of these Correct Answer Incorrect Answer

    Solution

    A symbol table is used in various phases of the compilation process, including lexical analysis. It stores information about identifiers (variables, functions, etc.) present in the source code, such as their names, data types, and memory locations.

    Practice Next

    Relevant for Exams: