ACtE08 · Chapter 8Demo2 · Set 2🏛️ Past Licensure QuestionID: 884bba12
What is the prefix (Polish notation) representation of the infix arithmetic expression: A * B / C - D ?
What is the prefix (Polish notation) representation of the infix arithmetic expression: A * B / C - D ?
Multiple Choice Options
- A✓ Correct Option•/ * A B C D
- B•* A B / C D
- C
/ - * A B C D
- D•- A B / C D
Detailed Technical Solution & Explanation
To convert the infix expression to prefix (Polish notation), we apply standard operator precedence (* and / higher than -) and left-to-right associativity:
1. First operation is multiplication:
2. Next operation is division:
3. Final operation is subtraction:
Resulting prefix string: - / * A B C D.
Option Analysis:
•
Option A (- / * A B C D): Correct; precisely follows operator precedence and left-associative order.
•
Option B (- * A B / C D): Incorrect; evaluates division after subtraction.
•
Option C (/ - * A B C D): Incorrect; places division at root.
•
Option D (* - A B / C D): Incorrect; places multiplication at root.
Reference: Demo2 · Set 2NEC Licensure Syllabus