You are on page 1of 18

Increment & Decrement operators [ ++ / -- ]:

They are used to increment or decrement a variable


value by 1.
Eg:
int a=3, b=1;
a++; i.e. a=a+1  a=4
b--; i.e. b=b-1;  b=0
postfix incre & postfix decrement:
Prefix incr & prefix decr:
Note: pre always first and post always last.

You might also like