Questions 51–55 of 55. Imported answers require independent review unless marked reviewed.

Topic practice 55 questionsPage 6 of 6

Question 6

Open question
CSMCQ1 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 answer

Question 12

Open question
CSMCQ1 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 answer

Question 17

Open question
CSMCQ1 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 answer

Question 43

Open question
CSNAT2 marksNeeds review
Consider the following grammar:
stmt

if expr then expr else expr; stmt

ò
expr

term relop term

term
term

id

number
id

a

b

c
number

[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 answer

Question 52

Open question
CSNAT2 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