Hello there,
Increment and decrement operators, are one of the most important operators in C language.
Both are of two types.
Prefix Increment : ++a; Postfix Increment : a++;
Prefix Decrement : --a ; Postfix Decrement : a--;
The precedence of post I and D operators is greater than Pre I and D operators. While as the associativity of Post I and D is from left to right whereas the associativity of Prefix I and D is from right to left .
Example:
int a,b,c ;
a = 10, b= 20, c = 1 ;
c += a++ * 5 - --b; Output : 32
Hope it helps.
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile