+ 2
What does || this operator???
8 ответов
+ 2
it is OR operator which gives condition as a choice. If one condition is true then the code will execute.
+ 2
it's OR operation
ex:x||y
this statement is false iff x=y=false.
+ 1
It is OR Operator.
It is a comparison operator in C++.
It is used to compare two values just like you compare two persons for a job.
If we use this operator and either one or both the values return true, then this operator also returns true.
But if both are false, then it returns false.
+ 1
|| is the logical expression of OR.
To complement:
&& is the logical expression of AND
0
is a or operator:
The return value are easy to understand.
return true, if one of the values or both are true.
return false, if both are falsr.
0
It is the OR operator. Often used in conditional statements to return true if either given condition is true. For example: if( condition1 || condition2 ){...}
0
the OR operator is used in conditional statements. It will evaluate to true if at least one of the boolean values are true.
Truth table:
True || true => true
true || false => true
false || true => true
false || false => false
0
it OR operator which is used for condition
for eg this or that