28. Which data structure is needed to convert infix notation to postfix notation?

a) Branch
b) Tree
c) Queue
d) Stack

Answer: d
Explanation: The Stack data structure is used to convert infix expression to postfix expression. The purpose of stack is to reverse the order of the operators in the expression. It also serves as a storage structure, as no operator can be printed until both of its operands have appeared.

Leave a Reply

Your email address will not be published.