The GATE Grind

GATE 2023 CS – Question 11

Compiler Design · Lexical Analysis · 1 mark · Multiple choice

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.

  1. Only S1 is TRUE.
  2. Only S1 and S2 are TRUE.
  3. S1, S2, and S3 are all TRUE.
  4. Only S1 and S3 are TRUE.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) Only S1 and S2 are TRUE.

Explanation

The front-end is source-language specific and target independent, and the back-end is target specific. S3 is false, so only S1 and S2 are true.