non-zero)(See this article for more reference). Therefore, a & b returns true when both a and b are true (i.e. The result of the operation of a logical operator is a Boolean value either true or false.įor example, the logical AND represented as ‘&’ operator in C or C++ returns true when both the conditions under consideration are satisfied. Logical Operators are used to combining two or more conditions/constraints or to complement the evaluation of the original condition in consideration. operator to check if a is smaller than b Some of the relational operators are (=, >=, <= )(See this article for more reference). For example, checking if one operand is equal to the other operand or not, an operand is greater than the other operand or not, etc. These are used for the comparison of the values of two operands.
0 Comments
Leave a Reply. |