Time Left - 15:00 mins
GATE 2024 compiler design Rank Booster Quiz 18
Attempt now to get your rank among 45 students!
Question 1
Identify the SDT which follow L-attributed definition but not S-attributed definition.
Question 2
Consider the following SDT:
What is the missing translation (1) and (2), if the string “2 × 3 + 5 × 3 + 1 × 3” produces 160 instead of 24?
Question 3
Consider the following SDT :
E → E + T {E.val = E.val - T.val , Printf(E.val)}
E → T {E.val = T.val+1}
T → T*F {T.val = T.val + F.val}
T → F {T.val = 2*F.val}
F → id {F.val = id}
What will be printed when the provided input is : 3*4*5+7 _________.
Question 4
Convert the following expression from infix to postfix: A/B^C-D ?
Question 5Multiple Correct Options
Which of the following statements are true regarding syntax directed translations (SDT)?
Question 6
Consider the following SDT:
S -> (S) {S.x = S1.x=1}
S -> [S] {S.x = S1.x}
S -> ε {S.x = 0}
Find the translation of above SDT.
Question 7
Type checking is normally done during ___
- 45 attempts
- 0 upvotes
- 0 comments
Nov 29GATE & PSU CS