The assignment operator is used to assign the value or
result of statement (expression) to a variable. The ‘=’ symbol is used as an
assignment operator.
The list of
assignment operators is as follows:
Operator
|
Meaning
|
=
|
A = B, A = A + B, A = 40
|
+=
|
A = A + 30, A = A + B
|
-=
|
A = A - 30, A = A – B
|
*=
|
A = A * 30, A = A * B
|
/=
|
A = A / 30, A = A / B
|
%=
|
A = A % 30, A = A % B
|
No comments:
Post a Comment