GATE CS 2023 | Question 11
Compiler Design › Basics & Lexical · MCQ · 1 mark · Answer: B
- Question 11Compiler Designmcq1 markConsider statements about a compiler. S1: The front-end includes phases independent of the target hardware. S2: The back-end includes phases specific to the target hardware. S3: The back-end includes phases specific to the programming language of 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.
Answer: B
Solution
Answer: (B) Only S1 and S2 are TRUE The front-end (lexical/syntax/semantic analysis, IR generation) is machine-independent -> S1 true. The back-end (code generation, machine-specific optimization) is target-hardware specific -> S2 true. The back-end is NOT source-language specific (it works on IR) -> S3 false. - A.
More GATE PYQ on Basics & Lexical
All GATE CS Compiler Design PYQ →Attempt GATE CS 2023 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →