Increment and Decrement operators in C-: C language providing very useful two operators these are the Increment and Decrement operators.
- First is the ++ it adds 1
- second is the — it subtract 1
we used these operators as like v++ or ++v and v– or –v these are two way we can use these operators
There are some rules for using these operators
- Increment and Decrement operators are unary operators and they requre variable
- when we use increment or decrement is used with a variable in an expression, the expression is evaluated first using original variable value after then variable is increment or decrement
- these are same unary + or unary –