# Using the evaluation of infix expression, evaluate a^b+c and choose the correct answer. (a=2, b=2, c=2)

+1 vote
Using the evaluation of infix expression, evaluate a^b+c  and choose the correct answer. (a=2, b=2, c=2)

(a) 12

(b) 8

(c) 10

(d) 6

This question is from Evaluation of an Infix Expression (Not Parenthesized) in division Application of Stacks of Data Structures & Algorithms I

This question was addressed to me by my college director while I was bunking the class.

+1 vote
by (408k points)
selected by

Easy explanation - ^ has the highest precedence. Hence, 2^2 is evaluated and then 4+2 gives 6.

+1 vote
+1 vote
+1 vote