Skip to content
Related Articles

Related Articles

GATE | GATE 2017 MOCK II | Question 58

View Discussion
Improve Article
Save Article
  • Last Updated : 28 Jun, 2021

Consider the following SDT

    S -> 1A23    {print “GA”}
    A -> 4S        {print “TE”}
    A -> 5        {print “C”}
    A -> B        {print “SE”}
    B -> 6B        {print “TE”}
    B -> 2        {print “ST”}

What will be output by the SDT for the input string “14122323”?
(A) GATEGASEST
(B) STSEGATEGA
(C) STGASETEGA
(D) GASTSEGATE


Answer: (B)

Explanation: sdt

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!