K&R C Programs Exercise 4-11
Exercise 4-11. Modify getop so that it doesn’t need to use ungetch. Hint: use an internal static variable. In the original calculator, getop calls ungetch once: when it reads a non-digit character to terminate a number, it pushes that character back so the next call to getop will see it. The fix: instead of pushing …