ARITHMETIC OPERATORS :
There are two types of arithmetic operators. They are...
1) Binary operator
2) Unary operator
1) Binary operator: These arithmetic operators are used for numerical calculation between the two constant values.They are also called as binary arithmetic operators.
There are two types of arithmetic operators. They are...
1) Binary operator
2) Unary operator
1) Binary operator: These arithmetic operators are used for numerical calculation between the two constant values.They are also called as binary arithmetic operators.
Arithmetic operator
|
Operator explanation
|
Example
|
+
|
Addition
|
2+2=4
|
-
|
Subtraction
|
5-3=2
|
*
|
Multiplication
|
2*2=4
|
/
|
Division
|
10/2=5
|
%
|
Modular
division
|
11%3=2(remainder)
|
2) Unary operator: Unary operator are Increment operator are Decrement operator.
Operator
|
Action
|
-
|
Minus
|
++
|
Increment
|
--
|
Decrement
|
&
|
Address operator
|