Time Left - 12:00 mins
GATE CS 2019 - Compiler Design (ICG ) Quiz-1
Attempt now to get your rank among 461 students!
Question 1
Find the expression which is represented by the following DAG (Directed Acyclic Graph)?
Question 2
What is the equivalent 3-address code for the above DAG?
Question 3
The intermediate code generated for the following syntax tree is -
Question 4
Find the minimum number of temporary variable which is used to represent the following 3 address code in the optimized manner -
T1=a+b
T2=T1+c
T3=T1*T2
T4=2*T3
T5=T4+d
T6=T5+T4
T1=a+b
T2=T1+c
T3=T1*T2
T4=2*T3
T5=T4+d
T6=T5+T4
Question 5
Which of the following expression represent the 3 address code as a triple notation of the following table -
Question 6
Consider the following quadruple notation table for the 3 address code given as -
Match the following S1,S2,S3 & S4 with the correct expression formed using the above table ?
LIST – I
i. S1=/, S2=c, S3=+, S4=x
ii. S1=+, S2=c, S3=/, S4=x
iii. S1=+, S2=x, S3=/, S4=c
LIST – II
a) c=a+b/x*a+b
b) x=a/b+c*a/b
c) x=a+b/c*a+b
Match the following S1,S2,S3 & S4 with the correct expression formed using the above table ?
LIST – I
i. S1=/, S2=c, S3=+, S4=x
ii. S1=+, S2=c, S3=/, S4=x
iii. S1=+, S2=x, S3=/, S4=c
LIST – II
a) c=a+b/x*a+b
b) x=a/b+c*a/b
c) x=a+b/c*a+b
- 461 attempts
- 0 upvotes
- 2 comments
Apr 10GATE & PSU CS