Assignment Vs Equal to Operators

  • = is an Assignment Operator it is used to assign the value of variable or expression.
    == is an Equal to Operator and it is a relation operator used for comparison (to compare value of both left and right side operands).
  • = assigns the value of right side expression’s or variable’s value to the left side variable.
    == compares value of both expressions, return 1 if they are equal other will it will return 0.

No comments:

Post a Comment