5. State the difference between = and ==.
Answers
Answer:
So it's cleared now, ,both are not same, = is an Assignment Operator it is used to assign the value of variable or expression, while == is an Equal to Operator and it is a relation operator used for comparison (to compare value of both left and right side operands.
Answer:
In short = is assignment operator, it assigns a value to a variable. == is comparison operator, it compares the value of two variables, if they are equal then it returns true otherwise false.
Explanation:
In computer science, the "=" symbol is used to assign a value to a variable, while the "==" symbol is used to compare the values of two variables to see if they are equal.
For example, in the statement "x = 5", the "=" symbol is used to assign the value of 5 to the variable x. On the other hand, in the statement "if x == 5", the "==" symbol is used to compare the value of x to 5, and the statement will evaluate to true if x is equal to 5.
More questions and answers
https://brainly.in/question/52885581
https://brainly.in/question/50334736
#SPJ3