Computer Science, asked by aanshranjan, 4 months ago

what do you mean by a=1 and a==1

Answers

Answered by anonymous937
0

Explanation:

In a =1, you assign value 1 to a. It means now 1 is stored in a. If you write a in any expression, it means you have written 1 there.

In a==1, you are checking if a is equal to 1 or not. It is just a condition check, which gives either true or false. It does not assign any value to a. The previously assigned value of a remains stored in a.

Answered by VISHALKUMARV22
5

"a = 1" is used for assigning values to a variable and "a == 1 " is used for comparing two variables.

Similar questions