Data Structures & AlgorithmsEasyTCS NQT · Infosys pattern

What is the postfix form of the infix expression A + B * C?

  1. A. A B C + *
  2. B. A B + C *
  3. C. + A * B C
  4. D. A B C * +

Correct answer: D. A B C * +

* has higher precedence than +, so B * C is grouped first: A (B C *) + gives A B C * +. A B + C * would be the postfix of (A + B) * C.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic