What are assignment operators?

Assignment operators are used to assign the values of variables.

Assignment Operators are:

  • Addition assignment(+=)
It adds the value of right hand side variable with left hand variable and assigns the resultant value to the left hand side variable.
  • Subtraction assigment(-=)
It subtracts the value of right hand side variable from left hand variable and assigns the resultant value to the left hand side variable.
  • Multiplication assignment(*=)
It multiplies the value of right hand side variable with left hand variable and assigns the resultant value to the left hand side variable.
  • Division assignment(/=)
It divides the value of left hand side variable by the value of right hand side variable and assigns it to the left hand side variable.
  • Assignment (=)
It assigns the value of right hand side variable to the left hand side variable.

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.