+ 11
Deference between x=y and x==y?
27 Respuestas
+ 16
If both x and y are int, x=y will change value of x.
x==y will give true or false as the output
+ 14
x = y, means that the value of x becomes the value of y. x == y compares the two values and returns true if they are equal and false if they are different.
+ 12
in x=y condition x acquires the value of y
+ 4
You only have the C++ course on your profile so I choose a C++ related question
https://www.quora.com/What-is-the-difference-between-and-operator-in-C%2B%2B
+ 3
The first will change x to y if they are integers. The second will activate booleans.
+ 3
The data in variable y is transferred to x. x==y value of x is equal to y.
+ 3
x=y means we are assigning y value to x.
x==y means we are comparing whether x is equal to y or not.
+ 3
x=y : means allocation(or command to copy each and every bit of y to x) of the value of the variable currently holding by the variable named by 'y' to the variable named by 'x';
And
x==y: means forcing the CPU to send the value of both 'x' and 'y' to the stack memory region of the program and '==' commanding the ALU to compare each bit of the variables ...
+ 1
If this helps
https://code.sololearn.com/cfob4Ie8GuGW/?ref=app
+ 1
Why are there so many, who write the same answers again, despite the question is already correctly answered?
+ 1
x=y means, we are assigning the value of y to x
while x==y means we are checking if x is equal to y (which can return the value of true or false).
+ 1
First one is assignment while
Second one is comparison
0
x=y means we are assigning the value of y to x
whereas x==y means we are comparing the values of x and y
0
x=y is you assigning x to y. x==y is true or false
0
x=y means you're assigning the variable of y to x. x==y is a relational operation which can only bring true or false results
0
x=y is a statement and x==y is a condition
0
x=y is an assignement . You assigning x to y but x==y is comparison
0
x=y means the value of var x = var y where x==y the value of x is equal to y which is the output
0
x=y|The operator used here is the Assignment Operator(=)which assigns the value of y to x.
whereas,
x==y|The operator used here is the Relational operator (==) which compares the value already assigned to the variables.
0
whit x=y you are assing the valor of y to x, with x==y you are telling they are equal.