Ans is option : B only
By shift reduce parser we can construct parse tree for Ambiguous grammar also...
For Ambiguous grammars, Shift- Reduce parser whenever RHS of a production is available, then it is immediately reduce it to LHS of the corresponding production.
a + b * c
E --------------------------------- print a ----> output : a
E + --------------------------
E + E ---------------------- print b ----> output : a b
E -------------------------------- print + ----> output : a b +
E * -----------
E * E ------- print c ----> output : a b + c
E --------------------- print * ----> output : a b + c *
E1 ------ print \$ ----> output : a b + c * $