Data Structure Questions and Answers-Evaluation of an Infix Expression (Not Parenthesized)
Click on any option to know the CORRECT ANSWERS
Using the evaluation of infix expression, evaluate a^b+c and choose the correct answer. (a=2, b=2, c=2)
Question 11 Explanation:
^ has the highest precedence. Hence, 2^2 is evaluated and then 4+2 gives 6.
Evaluate the following infix expression using algorithm and choose the correct answer. a+b*c-d/e^f where a=1, b=2, c=3, d=4, e=2, f=2.
Question 12 Explanation:
^ has the highest order of precedence. Hence, 2^2 is evaluated first, and then, 2*3 and 4/4 are evaluated. Therefore, 1+6-1=6.
From the given expression tree, identify the infix expression, evaluate it and choose the correct result.
Question 13 Explanation:
From the given expression tree, the result of the infix expression is evaluated to be 12.
There are 13 questions to complete.