Which among the following is used to group the characters into tokens?

2021

Which among the following is used to group the characters into tokens?

Answer: C. Lexical analyserThe lexical analyser (scanner) reads the input as a stream of characters and groups them into tokens (like keywords, identifiers, operators). ⇒ Hence, it is…

  1. A.

    Parser

  2. B.

    Code generator

  3. C.

    Lexical analyser

  4. D.

    None of the above

  5. E.

    Question not attempted

Attempted by 389 students.

Show answer & explanation

Correct answer: C

The lexical analyser (scanner) reads the input as a stream of characters and groups them into tokens (like keywords, identifiers, operators).
⇒ Hence, it is responsible for grouping characters into tokens.

Explore the full course: Bpsc

Loading lesson…