Logical Operators & Assignment Operators in C Language
C Language provides following three logical operators
= is the Assignment operator in C Language, using this you can assign a value to a variable like following.
int age = 20;
Shorthand assignment operators
a = a + b; can also be written as
a += b; These type of assignment operators are called as shorthand assignment operators.
Following is the full list of short hand assignment operators you can use.
|Using normal assignment operator||Using shorthand assignment operator|
|a = a + b||a += b|
|a = a - b||a -= b|
|a = a * b||a *= b|
|a = a / b||a /= b|
|a = a % b||a %= b|