Increment and Decrement operators are used to increase or decrease the value of a variable.
Increment operator :
Increment operators are the unary operators which are used to increase the operand value.
Increment operators has two types
1. Pre-increment operator
The pre-increment operator is used to increase the value of the operand before assigning it to the expression.
2. Post-increment operator
The post-increment operator is used to increase the value of the operand after assigning it to the expression.
Decrement operator :
Decrement operators are the unary operators which are used to decrease the operand value.
Decrement operators has two types
1. Pre-decrement operator
The pre-decrement operator is used to decrease the value of the operand before assigning it to the expression.
2. Post-decrement operator
The post-decrement operator is used to decrease the value of the operand after assigning it to the expression.
The Increment and Decrement operators are :
++ | Increment operator |
-- | Decrement operator |
0 Comments