question 3)
Look at b)
4 6 8 7 5 3 2 9 0 1
When it popped and printed 9, it means all push operations were finished at that point
(due to the ordering of pushes 0,1,...,9). OK, now it is reading 9. Then it is reading 0,
this means it is reading the very first number which was ever pushed to the stack.
Then there's no way it could pop and print 1 because it already popped the last
possible number (there's no way 1 was pushed after 0 was popped because as said
all push operations were done at the time 9 was popped).
You need to use similar logical observations to see why f) and g) are not possible too.
When reading all these sequences of popped numbers just try to imagine the sequence
of pushes which happens in between the pops (i.e. what was pushed since the last pop).
Whichever sequence of pops leads to a hiccup: that one is not possible i.e. could not occur.
question 2)
This one is trivial, anything but a) is not possible. Right?
Because as with a queue in a shop, the customers are served in the
order in which they came to the cash desk. Otherwise it would not be a queue.
question 1) You will learn more if you actually type this one, compile it and run it.