Increment and Decrement operators

Increment and Decrement operators in C-: C language providing very useful two operators these are the Increment and Decrement operators. 

  1. First is the          ++    it adds    1
  2.  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

  1. Increment and Decrement operators are unary operators and they requre variable
  2. 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
  3. these are same unary + or unary –

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *