1.

If -*+abcd = 11, find a, b, c, d using evaluation of prefix algorithm.(a) a=2, b=3, c=5, d=4(b) a=1, b=2, c=5, d=4(c) a=5, b=4, c=7,d=5(d) a=1, b=2, c=3, d=4The above asked question is from Application of Stacks in chapter Application of Stacks of Data Structures & Algorithms II had been asked this question in examination.

Answer»

The CORRECT option is (b) a=1, b=2, c=5, d=4

Easiest EXPLANATION - The given prefix expression is evaluated as ((1+2)*5)-4 = 11 while a=1, b=2, c=5, d=4.



Discussion

No Comment Found

Related InterviewSolutions