Home>Article>Backend Development> What does && mean in c language?

What does && mean in c language?

尚
Original
2020-03-03 13:42:56 57885browse

What does && mean in c language?

&& is a symbol used in programming. Is the logical (conditional) AND.

In the C language && is a binary operator, which represents the AND operation. When the expression or variable given on the left is 0, the right side is no longer calculated and the entire expression is zero.

How to use it as a logical operator:

x&&y

Function description: "Conditional AND": x and y are both true, and the value is true, Otherwise, the value is false

& and && both require the values of both operands to be true before the value is true, but there is still a difference between the two operators:

How to use is int&& rx=x;

Recommended: "c Language Tutorial"

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!

Statement:
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