What does Lexical analysis refer to?
- A. The compiler phase that checks source code for meaningful correctness, such as type consistency.
- B. The first phase of compilation that converts source code into a sequence of tokens. ✓
- C. A data structure used by a compiler to store information about variables, functions, and identifiers.
- D. A program that translates an entire source program written in a high-level language into machine code before execution.
Correct answer
B. The first phase of compilation that converts source code into a sequence of tokens.
Explanation
Lexical analysis refers to the first phase of compilation that converts source code into a sequence of tokens.