0% found this document useful (0 votes)
11 views3 pages

6 1154 81546 - Compiler Construction 81546

This document is an examination paper for a B.Tech course on Compiler Construction, scheduled for May 10, 2024, with a total of 70 marks. It includes multiple-choice questions, problem-solving tasks, and theoretical questions related to various aspects of compiler design and optimization techniques. The exam consists of five main questions, with specific instructions for answering and assumptions to be made where necessary.

Uploaded by

devab52664
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

6 1154 81546 - Compiler Construction 81546

This document is an examination paper for a B.Tech course on Compiler Construction, scheduled for May 10, 2024, with a total of 70 marks. It includes multiple-choice questions, problem-solving tasks, and theoretical questions related to various aspects of compiler design and optimization techniques. The exam consists of five main questions, with specific instructions for answering and assumptions to be made where necessary.

Uploaded by

devab52664
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

QP-343

Seat No. Total No. of Pages : 3

MAR-APR-2024 SUMMER EXAMINATION


B.Tech. CBCS
Sub. Name: Compiler Construction
Sub. Code: 81546

Day and Date: MAY ,10-05-2024 Total Marks: 70


Time: 02:30 PM To 05:00 PM
Instructions: 1. All questions are compulsory
2. Assume suitable data wherever necessary and mention it boldly
3. Figures to the right indicate full marks

Q1) Solve MCQs. [14]

27
[7x2=14]
a)Peephole optimization is a form of
i. Loop optimization
ii. Local optimization
iii. Constant folding
iv. Data flow analysis
66
b)A bottom up parser generates _______.
i. Right most derivations
ii. Right most derivations in reverse
iii. Leftmost derivations
iv. Leftmost derivations in reverse
25

c)The graph that shows basic blocks and their successor relationship is called
i. DAG
ii. Flow graph
iii. Control graph
iv. Hamiltonion graph

d)The most powerful parser is


i. SLR
ii. LALR
iii. Canonical LR
iv. Operator Precedence

e)In SDT , if value of an attribute of a node is a function of the values of the


attributes of its children, then it is called
i. Synthesized attribute
ii. Inherited attribute
iii. Canonical attribute
[1] P.T.O.
QP-343
iv. None of above

f)A compiler for high level language that runs on one machine and produce code for
a different machine is called
i. Optimizing compiler
ii. One pass compiler
iii. Cross compiler
iv. Multipass compiler

g)Which data structure in a compiler is used for managing information about


variables and their attributes?
i. Abstract syntax tree
ii. Symbol tree

27
iii. Semantic stack
iv. Symbol table

Q2) Solve any two of the following. [14]


[2x7=14]
66
a)Explain different phases of compiler in detail with suitable example.
b)Elaborate specification and recognition of tokens.
c)Explain in detail about input buffering.

Q3) Solve any two of the following. [14]


[2x7=14]
25

a)Eliminate the left recursion for the following grammar.


E-->E+T/T
T-->T*F/F
F-->(E)/id
b)Write short notes on basic blocks and flow graphs.
c)Explain S-attributed SDT and L-attributed SDT with example.

Q4) Solve any two of the following. [14]


[2x7=14]
a)Construct Predictive Parse Table for the given grammar and parse the string “abfg”
S→ aBS’
S’→ dS’|ϵ
B →bBC|f
C →g
b)Discuss the various issues in code generation with examples.
c)Discuss the various peephole optimization techniques in detail.

[2] P.T.O.
QP-343

Q5) Solve any two of the following. [14]


[2x7=14]
a) Explain three address codes with example.
b)Define a Directed Acyclic graph. Construct a DAG and write the three address
code for the expression ( a + b ) x ( a + b + c ).
c)Write short notes on compiler construction tools.

***

27
66
25

[3]

You might also like