1.

Evaluate the following statement using infix evaluation algorithm and choose the correct answer. 1+2*3-2(a) 3(b) 6(c) 5(d) 4Asked question is from Evaluation of an Infix Expression (Not Parenthesized) topic in chapter Application of Stacks of Data Structures & Algorithms IThe question was asked in an internship interview.

Answer»

The correct option is (C) 5

The explanation is: ACCORDING to precedence of OPERATORS, * is EVALUATED first. + and – have equal priorities. Hence, 1+6-2= 5.



Discussion

No Comment Found

Related InterviewSolutions