30. What is the result of the following operation?
Top (Push (S, X))

a) X
b) X+S
c) S
d) XS

Answer: a
Explanation: The function Push(S,X) pushes the value X in the stack S. Top() function gives the value which entered last. X entered into stack S at last.

Leave a Reply

Your email address will not be published.