0

what is the difference between = and ==?

27th Sep 2016, 2:29 AM
Shrinivas Deshpande
Shrinivas Deshpande - avatar
2 Answers
+ 3
= is assignment operator, it assign right operand to left operand. And == is an equality operator is checks that, whether left and right operands are equal to or not. If equal then result true(1) if not then false(0).
27th Sep 2016, 2:34 AM
mahesh kumar
mahesh kumar - avatar
+ 1
= asings the right value to the left variable. == is used to show if a variable's value is equal to the value on the right, usually used in if statements.
27th Sep 2016, 3:24 AM
Ashef
Ashef - avatar