#c language&&What does it mean?
“&&” means AND, meaning both are satisfied at the same time.
"||" means or, meaning two or more as long as one of them is satisfied.
In C language, && and || are both logical operators, and they are both binary operators.
There are three logical operators in total, namely "&&", "||" and "!". a && b, if one is false, it must be false, and the associativity is from left to right. || is the logical OR operator, a || b, if one is true, it must be true, and the associativity is from left to right.
&& and || are logical operators in Java, PHP and c#, also called conditional operators.
Extended information:
In C language && is a binary operator, which represents AND operation. When the expression or variable given on the left is At 0, the right-hand side is no longer evaluated and the entire expression is zero.
Logical operators are used to judge whether a thing is "established" or "not established", or "true" or "false". The result of the judgment has only two values, represented by numbers. It's "0" and "non-0".
Among them, "non-0" means that the result of the logical operation is "true", and "0" means that the result of the logical operation expression is "false".
Recommended tutorial: "C Language"
The above is the detailed content of What does && mean in c language?. For more information, please follow other related articles on the PHP Chinese website!