• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE CS 2020 | Question 43

Consider the productions A → PQ and A → XY. Each of the five non-terminals A,P,Q,X, and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute. Consider the following rules.
Rule 1: P.i=A.i+2, Q.i=P.i+A.i, and A.s=P.s+Q.s
Rule 2: X.i=A.i+Y.s and Y.i=X.s+A.i 
Which one of the following is TRUE ?

(A)

Both Rule 1 and Rule 2 are L-attributed

(B)

Only Rule 1 is L-attributed

(C)

Only Rule 2 is L-attributed

(D)

Neither Rule 1 nor Rule 2 is L-attributed

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments