All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2022 Shift 2

Given the expression (A + B * D) / (E − F) + G:
1. The prefix notation is + / + A * D B − E F G
2. The prefix expression is the reverse of the postfix expression.
3. The order of operands in the infix expression and postfix expression is the same.
4. The order of operands in the infix, prefix and postfix expressions is the same.
Choose the most appropriate answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. 3 and 4 only

Explanation

Correct prefix: + / + A * B D − E F G (statement 1 has D B). Postfix A B D * + E F − / G +. Prefix is not its reverse. Operand order A B D E F G is the same in all three forms.

More Data Structures and Algorithms questions