Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
3K views

Compiler Design Multiple Choice Questions Answers PDF

This document contains 5 multiple choice questions about compiler design topics like parsing methods, attribute grammars, and optimization techniques. Each question is followed by the correct answer and a brief explanation. The questions cover LR grammars, recursive descent parsing, constant folding, context sensitive grammars, and structural statements.

Uploaded by

Kshitij Nayak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views

Compiler Design Multiple Choice Questions Answers PDF

This document contains 5 multiple choice questions about compiler design topics like parsing methods, attribute grammars, and optimization techniques. Each question is followed by the correct answer and a brief explanation. The questions cover LR grammars, recursive descent parsing, constant folding, context sensitive grammars, and structural statements.

Uploaded by

Kshitij Nayak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Compiler Design Multiple Choice Questions and Answers Pdf

Question: 1

Synthesized attribute can be easily simulated by a

(A) LR grammar

(B) LL grammar

(C) Ambiguous grammar

(D) None of these

Ans: A

LR grammar

Question: 2

The top-down parsing method is also called

(A) Operator precedence parsing

(B) Recursive descent parsing

(C) Shift reduce parsing

(D) None of these

Ans: B

Recursive descent parsing

Question: 3
Which of the following techniques is used to replace run-time
computations by compile time computations?

(A) Constant folding

(B) Code hoisting

(C) Pee phole optimization

(D) Invariant computation

Ans: A

Constant folding

Question: 4

The most general phase structured grammar

(A) Context sensitive

(B) Context free

(C) Regular

(D) None of these

Ans: A

Context sensitive

Question: 5

Which of the following class of statement usually produces no


executable code when compiled?
(A) Assignment statement

(B) Structural statements

(C) Input and output statements

(D) Declaration

Ans: B

Structural statements

You might also like