1. Evaluate the following postfi x expressions by using the algorithm given in section 6.3.1. Show the status of the stack after each step of the algorithm. Assume the following values for the identifi ers: x = 4, y = 9, z = 12, p = –7, q = 1.
a. x y + z –
b. x y + z p - *
c. x y * z – p q + -
2. Convert the following infi x expressions to postfi x form by using the algorithm given in section 6.3.2. Show the status of the stack after each step of the algorithm.
a. a + b - c b. (a + b) * (c – d)
c. (a * (b * c)) – d + e / f d. a / (b – c) + ( d + e ) * f
e. ((a + b) * c – (d – e)) * (f + g) f. a + ( b * c / d ) – e
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here