πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      What does a lexer (lexical analyzer) do in the

      compilation process?
      A Generates optimized machine code Correct Answer Incorrect Answer
      B Checks for semantic errors Correct Answer Incorrect Answer
      C Converts high-level code to assembly language Correct Answer Incorrect Answer
      D Converts source code into a stream of tokens Correct Answer Incorrect Answer
      E None of these Correct Answer Incorrect Answer

      Solution

      A lexer (lexical analyzer) is responsible for converting the source code into a stream of tokens. It identifies keywords, operators, identifiers, and other language constructs, producing a structured representation that's easier for the subsequent compilation phases to process.

      Practice Next
      More IT Networking Questions

      Relevant for Exams:

      ask-question