adplus-dvertising

Welcome to the Compiler Design MCQs Page

Dive deep into the fascinating world of Compiler Design with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Compiler Design, a crucial aspect of GATE CSE Exam. In this section, you will encounter a diverse range of MCQs that cover various aspects of Compiler Design, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within GATE CSE Exam.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Compiler Design. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of GATE CSE Exam.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Compiler Design. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Compiler Design MCQs | Page 10 of 12

Q91.
What is E val for string 1 * 0?

a.

8

b.

6

c.

4

d.

12

Discuss
Answer: (c).4
Q92.
After removing left recursion from the following A → A α/β the resulting grammar will be,

a.

A

b.

B

c.

C

d.

D

Discuss
Answer: (a).A
Q93.
Consider the following grammar:

Stmt → if expr then stmt else stmt | if expr then stmt

After removing left factoring the resulting grammar will be?
Discuss
Answer: (b).Stmt → if expr then Stmt Eˡ Eˡ → Else Stmt / E
Q94.
Consider the following grammar. After removing left factoring the resulting grammar will be

a.

A

b.

B

c.

C

d.

D

Discuss
Answer: (a).A
Q95.
Consider the following grammar:

A → cAd A → ab/ac/a

For Input string cad, how many times the recursive descent parser will backtrack ?

a.

2

b.

3

c.

4

d.

5

Discuss
Answer: (a).2
Q96.
Consider the following grammar:

S → Abc A → ab/ac/a

For Input string cad, how many times the recursive descent parser will backtrack?

a.

2

b.

3

c.

4

d.

5

Discuss
Answer: (a).2
Q97.
Consider the following grammar:

num → 10 ⁄ 1000 ⁄ numo ⁄ num num

Which of the following statement correctly represent the grammar?
Discuss
Answer: (b).Grammar having binary value divisible by 2
Q98.
Consider the following grammar:

S → S+S
S → S*S
S → id

What we can say about precedence of operator + and * ?
Discuss
Answer: (c).Both using same precedence
Q99.
Suppose ↑ is a binary operation and consider the following:

E → T↑E⁄T
T → id

Which of the following statement is true?
Discuss
Answer: (b).↑ operation is right Associative
Q100.
Consider the following grammar:

S → Aa⁄b
A → Ac⁄Sd⁄E

After removing left recursion the resulting grammar will be

a.

A

b.

B

c.

C

d.

D

Discuss
Answer: (c).C
Page 10 of 12

Suggested Topics

Are you eager to expand your knowledge beyond Compiler Design? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!