๐Ÿ“ข Too many exams? Donโ€™t know which one suits you best? Book Your Free Expert ๐Ÿ‘‰ call Now!

  • google app store apple app store
  • โœ–

      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