Arithmetic Operators

                 Arithmetic operators are the basic operators in C Language. These are used for arithmetic calculations.

1.Addition(+)

               The addition of Two variables we can use the Addition(+) operator.

                Eg:  sum=a+b,  sum=a+b+c, 


2.Subtraction(-)

                The Subtraction of Two variables we can use the Subtraction(-) operator.

                Eg:  sub= a-b, sub=a-b-c.


3.Multiplication(*)

                The Multiplication of Two variables we can use the Multiplication(*) operator.

                Eg:   mul=a*b, mul=a*b*c


4.Division(/)

                The division of Two variables we can use the Division(/) operator.

                Eg:  div=a/b

5. Modulus/Remainder(%)

                If we want to take the remainder of any division, we can use the Modulus(%) Operator.

                Eg:  mod=a%b




No comments:

Post a Comment