"=" is an assignment operator which is used to assign value to the variable ex: int b=7;
"==" is a relational operator which is used to find the relation between two operands and returns in boolen value either 'true' or 'false' example: 5==5
Returns 1 or true
= as in x=2 says give x the value of 2. Then on x's value will be two. This is an assignment operator as ot assigns x a value of two.
== as in if(x==2) checks whether x has a value of 2. this is a relational operator as it looks how two things are similar dissimilar of do they fall in the same category like if (x <2).
(=) is a Assignment Operators, for assigning a value to a variable.
(==) is a Relational Operators, checks the relationship between two operands.
x = 10; Now 10 is assign to the variable x.
5 == 10; checks whether the relation is equal or not.
= also known as the assignment operator it assigns the value of its right hand side element to the value of its left hand side
if a=b then the value of b is assigned to a
on the other hand == is used for the comparison of elements other than string types
= is nothing but assigning a value for a variable...for example a=5...this means that the value 5 is stored in memory location a...== is a relational operator...... means checks the equality of variables..i.e., checking whether the value belongs to that variable or not...
the = is an assignment statement , the value on the left of it will get a new value that's the result of the right of it.
while the == is like asking if the right equals the left; and thus the answer will be yes or no..
The '=' is the assignment operator, which assigns the value at the right hand side to the variable at the left hand side. Eg. x=4, here the value 4 is assigned to 'x'.
On the other hand, '==' is the relational operator which is used to check whether the value on both the sides are equal or not. If true, it returns a boolean true or '1' and if false, it returns a boolean false or '0'.