All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · June 2024 (Cancelled Exam)

Which of the following is a function of the semantic analysis phase of compilation?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. Type conversion

Explanation

Semantic analysis does type checking and inserts type conversions (coercions). Tokenisation is lexical analysis; loop optimisation and data-flow analysis belong to optimisation.

More Theory of Computation and Compilers questions