Arithmatic Operators:
Here A=10 and B=5 assign
Operator |
Description |
Example |
+ |
Add two operands |
A+B will give 15 |
- |
Subtracts second operand from the first |
A-B will give 5 |
* |
Multiply both operands |
A*B will give 50 |
/ |
Divide numerator by denumerator |
A/B will give 2 |
- |
Modulus Operator and remainder of after an integer division |
A%B will give 0 |
++ |
Increment operator, increases integer value by one |
A++ will give 11 |
-- |
Decrement operator, decreases integer value by one |
A-- will give 9 |
Get More Knoweledge You Join
Sharda Technologies
No comments:
Post a Comment