Add the ^ operator to the expression language processed by the infix to postfix converter developed in Project 6. This operator has a higher precedence than either * or /. Also, this operator is right associative, which means that consecutive applications of this operator are evaluated from right to left rather than from left to right. Thus, the value of the expression 2 ^ 2 ^ 3 is equivalent to 2 ^ (2 ^ 3) or 256, not (2 ^ 2) ^ 3 or 64. The algorithm for infix to postfix conversion must be modified to place the operands as well as the operators in the appropriate positions in the postfix string.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here