Modify getop so that it doesn't need to use ungetch. Hint: use an internal static variable. The point of illustration of this program is the static variable, lastc, which gets initialized once as a ...
Our getch and ungetch do not handle a pushed-back EOF correctly. Decide what their properties ought to be if an EOF is pushed back, then implement your design. The previous getch and ungetch functions ...