Open In App

GATE | GATE 2017 MOCK II | Question 58

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:


Quiz of this Question

Article Tags :