About Lesson
Assignment Operators:-
Assignment operators are used to assign a value (or) an expression (or) a value of a variable to another variable.
Compound assignment operator:
“C” provides compound assignment operators to assign a value to variable in order to assign a new value to a variable after performing a specified operation.
|
Operator |
Example |
Meaning |
|
+ = |
x + = y |
x=x+y |
|
– = |
x – = y |
x=x-y |
|
* = |
x * = y |
x=x*y |
|
/ = |
x / = y |
x=x/y |
|
% = |
x % = y |
X=x%y |