- Assignment operators are used to assign values of variables to each other.
- Below are some of the different assignment operators used in C language.
Operators
| Description |
= | This operator assigns the value of the operand of the right side to the operand of the left side. |
+= | This operator assigns the value of the operand of right side in the operand left side and assigns the operand with the result left side. You can also write it in this way. a = a + b; |
+= | This operator subtract the value of the operand of the right side operand from the value of operand left side and store it in the result left side variable. You can also write it in this way. a = a-b; |
*= | This operator stores the left side of the operand with the value of the operand value of the right side and stores the result in the operand of the left side. |
/= | It divides the value of operator left operand with the value of right operand and stores the result in the operand of the left side. |
%= | This operator divides the value of the operand left side with the value of the operand of the right side and stores the remaining result in the operand of the left side. |
No comments:
Post a Comment
Please do not any spam link in Comment Box