Time Left - 15:00 mins
GATE 2024 Compiler Design Foundation Quiz 97
Attempt now to get your rank among 26 students!
Question 1
Consider the following code segment:
p = q + r
p = q + r
s = p - r
t = p × s
u =p + r
z =u + v
The total number of variables required to convert the above code segment to static single assignment form are?
Question 2
Consider the following statements:
I. In three -address code, the given expression is broken down into several separate instructions.
II. Each three-address code instruction has at least three operands.
The number of statements that is /are not true?
Question 3Multiple Correct Options
Which amongst the following is used to represent intermediate code?
Question 4
Consider evaluating the following expression tree on a machine in which memory can be accessed only through load and store instructions. The variables p, q, r, s, t, u and v are stored in memory. The machine can only evaluate the binary operators used in the tree when all operands are in the register. The instruction produces results only in a register.
What is the minimum number of registers needed to evaluate the expression if no intermediate results can be stored in memory?
Question 5
Which of the following is/are representations of intermediate code?
1) Syntax tree
2) Postfix
3) 3-Address code
4) Directed Acyclic Graph (DAG)
- 26 attempts
- 0 upvotes
- 0 comments
Jun 17GATE & PSU CS