C Programming - Expressions - Discussion

Discussion Forum : Expressions - General Questions (Q.No. 2)
2.
Which of the following correctly shows the hierarchy of arithmetic operations in C?
/ + * -
* - / +
+ - / *
/ * + -
Answer: Option
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)
  • Discussion:
    13 comments Page 2 of 2.

    Arjun singh said:   8 years ago
    The correct answer is */+-.

    Aditi Naikwadi said:   4 years ago
    The correct ans is */%+- =.

    Kapil said:   1 decade ago
    And what about % mod?


    Post your comments here:

    Your comments will be displayed after verification.