Consider the following statements regarding the front-end and back-end of a compiler.

S1: The front-end includes phases that are independent of the target hardware.

S2: The back-end includes phases that are specific to the target hardware.

S3: The back-end includes phases that are specific to the programming language used in the source code.

Identify the CORRECT option.

A.

Only S1 is TRUE.

B.

Only S1 and S2 are TRUE.

C.

S1, S2, and S3 are all TRUE.

D.

Only S1 and S3 are TRUE.

Solution:



Front end is independent of hardware because the front end is specific to the programming language.

Back end includes phases that are specific to hardware.

So, statements S1 and S2 are true.