some one pls tell why it is wrong?
to derive a^b*c
first we use E->E^E
so it print first all id , then * after this ^ will be print.
To derive a^b*c, one can use either of the following two derivations:-
E ==> E ^ E
==> E ^ E * E
==> a ^ b * c
E ==> E * E
Draw a parse tree for both the derivations and do a postorder traversal of the same. The outputs would be a b ^ c* and a b c * ^. Only one of these is mentioned in the option and so that would be the answer. :)