+1 vote
in Data Structures & Algorithms I by (110k points)
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=4

The above asked question is from Application of Stacks in chapter Application of Stacks of Data Structures & Algorithms I

I had been asked this question in examination.

1 Answer

+1 vote
by (408k points)
selected by
 
Best 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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...