C Shorthand
C has a special shorthand that simplifies coding of certain type of assignment.
For Example
a = a + 2;
can be written as :
a += 2;
Shorthand works for akk binary operators in C.
Syntax :
variable operator = variable / constant / expression
Operators are listed below :
Operators Example Meaning += a+=2 a=a+2 -= a-=2 a=a-2 *= a*=2 a=a*2 /= a/=2 a=a/2 %= a%=2 a=a%2 &&= a&&=2 a=a&&2 ||= a||=2 a=a||2