What does && mean in c language?

烟雨青岚
Release: 2020-06-16 14:24:32
Original
12204 people have browsed it

What does && mean in c language?

#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.

What does && mean in c language?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!