Home / C Programming / Expressions :: Discussion

Discussion :: Expressions

  1. Which of the following correctly shows the hierarchy of arithmetic operations in C?

  2. A.

    / + * -

    B.

    * - / +

    C.

    + - / *

    D.

    / * + -

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Simply called as BODMAS (Bracket of Division, Multiplication, Addition and Subtraction).

    How Do I Remember ? BODMAS !

    • B - Brackets first
    • O - Orders (ie Powers and Square Roots, etc.)
    • DM - Division and Multiplication (left-to-right)
    • AS - Addition and Subtraction (left-to-right)

     

     


Be The First To Comment