Arithmetic operators
It uses to perform arithmetic or in other words to perform mathematical operations
There are two types of arithmetic operators
Unary– Unary operators performs operations with single operand
Binary– Binary operators performs operations between two operands
Tabular representation of all Arithmetic operations below:
| Operators | Mathematical Operator | Operational Type | Description | Example |
| + | Binary | Addition | Adds two operands | X+Y |
| – | Binary | Subtraction | Subtracts two operands | X-Y |
| * | Binary | Multiplication | Multiplies two operands | X*Y |
| / | Binary | Division | Divides the first operand by the second | X/Y |
| % | Binary | Modulus | First operand is divided by the second and retruns the reminder | X%Y |
| ++ | Unary | Increment | Increments the value of an integer(X++ is Post-increment, ++X is Pre-increment) | X++,++X |
| – – | Unary | Decrement | Decrements the value of an integer(Y- – is Post-decrement, – -Y is Pre-decrement) | Y- -,- -Y |