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: sdt

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.