Compiler Design Questions and Answers for Gate 2020-2021 - 1

Question: 1

How many parts of compiler are there?

(A) 2

(B) 4

(C) 6

(D) 8

Ans: A

2

Question: 2

Which of the following is/are the phases of compiler?

(A) Code generation

(B) Syntax analyser

(C) Lexical analyser

(D) All of these

Ans: D

All of these

Question: 3

Compiler translates the source code to

(A) Machine code

(B) Executable code

(C) Binary code

(D) Both A and C

Ans: D

Both A and C

Question: 4

Grammar of the programming is checked at _____ phase of compiler.

(A) Syntax analysis

(B) Semantic analysis

(C) Code generation

(D) Code optimization

Ans: A

Syntax analysis

Question: 5

Which of the following groups is/are token together into syntactic structures?

(A) Syntax analyzer

(B) Semantic analyzer

(C) Lexical analyzer

(D) Intermediate code generation

Ans: C

Lexical analyzer

Related Questions