PYQ Vault
PYQs
Notes
Most Asked
Mocks
Board
Store
Visuals
Play
PYQs
Most Asked
Notes
Mocks
Board
2 questions
Filters
3
Download
· 2
Filtering by:
GATE CS
Compiler Design
Intermediate Code Generation (2)
Clear all
Copy link
GATE CS · 2024 · Set 2 · IISc Bengaluru · Q43
Add
#1
·
Moderate
·
Triples
Consider the following expression:
x
[
i
]
=
(
p
+
r
)
∗
−
s
[
i
]
+
u
/
w
x[i] = (p + r) * -s[i] + u/w
x
[
i
]
=
(
p
+
r
)
∗
−
s
[
i
]
+
u
/
w
.
The following sequence shows the list of triples representing the given expression, with entries missing for triples (1), (3), and (6). | | | | | |---|---|---|---| | (0) | + |
p
p
p
|
r
r
r
| | (1) | | | | | (2) | uminus | (1) | | | (3) | | | | | (4) | / |
u
u
u
|
w
w
w
| | (5) | + | (3) | (4) | | (6) | | | | | (7) | = | (6) | (5) | Which one of the following options fills in the missing entries CORRECTLY?
A
(1) =[]
s
s
s
i
i
i
(3) * (0) (2) (6) []=
x
x
x
i
i
i
B
(1) []=
s
s
s
i
i
i
(3)
−
-
−
(0) (2) (6) =[]
x
x
x
(5)
C
(1) =[]
s
s
s
i
i
i
(3) * (0) (2) (6) []=
x
x
x
(5)
D
(1) []=
s
s
s
i
i
i
(3)
−
-
−
(0) (2) (6) =[]
x
x
x
i
i
i
Show solution
Report
GATE CS · 2025 · Set 2 · IIT Roorkee · Q21
Add
#2
·
Easy
·
Backpatching
Consider the following statements about the use of backpatching in a compiler for intermediate code generation: (I) Backpatching can be used to generate code for Boolean expression in one pass. (II) Backpatching can be used to generate code for flow-of-control statements in one pass. Which ONE of the following options is CORRECT?
A
Only (I) is correct.
B
Only (II) is correct.
C
Both (I) and (II) are correct.
D
Neither (I) nor (II) is correct.
Show solution
Report
AFCAT
SSC CGL
SSC CGL Tier II
SPI
Homi Bhabha Class 9
MH Scholarship Class 4
MH Scholarship Class 7
About
How it works
Get the app
Blog
About
Send feedback
Email us
Terms
Refunds
Privacy
Contact
PYQ Vault
PYQs
Notes
Most Asked
Mocks
Board
Store
Visuals
Play
PYQs
Most Asked
Notes
Mocks
Board