1000+ Compiler Construction MCQS with Answers Pdf - 1

Question: 1

Type checking is normally done during

(A) Code optimization

(B) Syntax directed translation

(C) Syntax analysis

(D) Lexical analysis

Ans: B

Syntax directed translation

Question: 2

A grammar is said to be ambiguous if

(A) Two or more productions have the same non terminal on the left hand side

(B) Brackets are not present in the grammar

(C) A derivation tree has more than one associated sentence

(D) There is a sentence with more than one derivation tree corresponding to it

Ans: D

There is a sentence with more than one derivation tree corresponding to it

Question: 3

Pee hole optimization is a form of

(A) Data flow analysis

(B) Constant folding

(C) Local optimization

(D) Loop optimization

Ans: B

Constant folding

Question: 4

In a resident – OS computer, which of the following systems must reside in the main memory under all situations?

(A) Assembler

(B) Linker

(C) Compiler

(D) Loader

Ans: D

Loader

Question: 5

Which of the following is used for grouping of characters into tokens?

(A) Scanner

(B) Code generator

(C) Code optimization

(D) Parser

Ans: A

Scanner

Related Questions