Computer Science and Information Technology
GATE CSE Compiler Design PYQs
Build your understanding with focused practice from past exam papers.
Questions 51–55 of 55. Imported answers require independent review unless marked reviewed.
Question 6
Open questionCSMCQ1 markNeeds review
Which of the following statements about parser is/are CORRECT?
I. Canonical LR is more powerful than SLR.
II. SLR is more powerful than LALR.
III. SLR is more powerful than Canonical LR.
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 12
Open questionCSMCQ1 markNeeds review
Consider the following intermediate program in three address code
p = a - b
q = p * c
p = u * v
q = p + q
Which one of the following corresponds to a static single assignment form of the above code?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 17
Open questionCSMCQ1 markNeeds review
Consider the following grammar:
P → xQRS
Q → yZ | z
R → w | ε
S → y
What is FOLLOW(Q)?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 43
Open questionCSNAT2 marksNeeds review
Consider the following grammar:
stmt
if expr then expr else expr; stmt
òexpr
term relop term
termterm
id
numberid
a
b
cnumber
[0-9]where relop is a relational operator (e.g.,<, >, …), ò refers to the empty statement, and if, then, else are terminals.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 52
Open questionCSNAT2 marksNeeds review
Consider the expression
. Let X be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture, in which (i) only load and store instructions can have memory operands and (ii) arithmetic instructions can have only register or immediate operands. The value of X is ________.Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer