📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    In a compiler, lexical analysis is responsible

    for:
    A Parsing the source code into syntax trees Correct Answer Incorrect Answer
    B Converting high-level code into assembly Correct Answer Incorrect Answer
    C Breaking the input into tokens Correct Answer Incorrect Answer
    D Checking semantic errors Correct Answer Incorrect Answer
    E Generating intermediate code Correct Answer Incorrect Answer

    Solution

    Lexical analysis is the first phase of compilation. It scans the input source code and converts sequences of characters into tokens (keywords, identifiers, operators, etc.), which are then passed to the syntax analysis phase.

    Practice Next
    ask-question