1000+ Compiler Design Interview Questions and Answers Pdf - 1

Question: 1

Access time of the symbol table will be logarithmic, if it is implemented by

(A) linear list

(B) self organizing list

(C) search tree

(D) hash table

Ans: C

search tree

Question: 2

In a compiler, keywords of a language are recognized during

(A) dataflow analysis

(B) the code generation

(C) parsing of the program

(D) the lexical analysis of the program

Ans: D

the lexical analysis of the program

Question: 3

One of the purposes of using intermediate code in compilers is to

(A) increase the chances of reusing the machine independent code optimizer in other compilers

(B) improve the register allocation

(C) improve error recovery and error repeating

(D) make parsing and semantic analysis simpler

Ans: A

increase the chances of reusing the machine independent code optimizer in other compilers

Question: 4

Two finite state machines are said to be equivalent, if

(A) recognize same set of tokens

(B) have same number of states and edges

(C) have same number of edges

(D) have same number of states

Ans: A

recognize same set of tokens

Question: 5

Which table is a permanent database that has an entry for each terminal symbol?

(A) reductions

(B) identifier table

(C) literal table

(D) terminal table

Ans: D

terminal table

Related Questions