+ 1
Which operator is use in if Assignment operator (=), comparison operator (==)
2 Antworten
+ 8
In if, if u want to check the value or when u are putting condition, use comparison operator and when u want to do operation based on the condition, use =.
For example,
int a = 2;
if ( a == 2) //Condition {
a = a+1 ; //Operation
}
0
Right