Semantic Analysis & Type Checking

Answer & solution
Answer: C (no official key was published)
Lexical analysis identifies tokens, and parsing checks grammatical structure. Type checking instead propagates and compares semantic attributes: for example, an addition node checks operand types and computes the result type. Syntax-directed definitions or translation rules attach exactly these operations to grammar productions, making C the appropriate option. Optimization can use type information but is not the normal first stage responsible for establishing semantic type compatibility.