Compiler Design Online Test Question Bank with Answers - 1

Question: 1

Which of the following cannot be used as an intermediate code form?

(A) Quadruples

(B) Syntax trees

(C) Three address codes

(D) Post fix notation

Ans: A

Quadruples

Question: 2

Which of the following can be used to identify loops?

(A) Dominators

(B) Reducible graphs

(C) Depth first ordering

(D) All of these

Ans: D

All of these

Question: 3

The cost of developing a compiler is proportional to

(A) Flexibility of the available instruction set

(B) Complexity of the architecture of the target machine

(C) Complexity of the source language

(D) All of these

Ans: D

All of these

Question: 4

Replacement of an expensive operation by a cheaper one is called

(A) Reduction in strength

(B) Loop-invariant computation

(C) Code motion

(D) None of these

Ans: A

Reduction in strength

Question: 5

Which of the following is not a source of error?

(A) Faulty design specification

(B) Faulty algorithm

(C) Compilers themselves

(D) None of these

Ans: D

None of these

Related Questions