1.

Evaluate the following statement using infix evaluation algorithm and choose the correct answer. 4*2+3-5/5(a) 10(b) 11(c) 16(d) 12My question comes from Evaluation of an Infix Expression (Not Parenthesized) in chapter Application of Stacks of Data Structures & Algorithms IThe question was asked during an online interview.

Answer»

The correct option is (a) 10

The best I can explain: 4*2 and 5/5 are evaluated first and then, 8+3-1 is evaluated and the RESULT is OBTAINED as 10.



Discussion

No Comment Found

Related InterviewSolutions