hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    Which of the following prefix expressions is obtained on converting the infix expression A * ( B - C )?
    Question

    Which of the following prefix expressions is obtained on converting the infix expression A * ( B - C )?

    A.

    A B C * -

    B.

    - A * B C

    C.

    * - A B C

    D.

    * A – B C

    Correct option is D

    Step-by-Step Conversion:

    Infix expression:

    A * (B-C)

    Step 1: Identify the operators and operands

    • B - C is evaluated first (inside parentheses)
    • Result is then multiplied by A

    Step 2: Convert from infix to prefix (operator before operands)

    • B - C → - B C
    • A * (B - C) → * A - B C

    So, the correct prefix expression is:
    *A - BC

    Important Key Points:

    1. Prefix notation (Polish notation) places the operator before its operands.
    2. Brackets in infix expressions help determine operation priority.
    3. Conversion to prefix involves recursively processing operators inside out, maintaining precedence.

    Knowledge Booster:

    • A B C * -: This is in postfix (Reverse Polish Notation) form, not prefix.
    • - A * B C: Incorrect operator placement; does not reflect correct grouping.
    • * - A B C: Incorrect operand order — A is multiplied, not subtracted.

    Free Tests

    Free
    Must Attempt

    Government Policies and Scheme

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon5 Mins
    languageIcon English
    Free
    Must Attempt

    Government Schemes

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon5 Mins
    languageIcon English
    Free
    Must Attempt

    SSC GD PYP (Held on 4 Feb 2025 S1)

    languageIcon English
    • pdpQsnIcon80 Questions
    • pdpsheetsIcon160 Marks
    • timerIcon60 Mins
    languageIcon English
    test-prime-package

    Access ‘UPSSSC’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    students-icon
    368k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow