> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# C Logical AND

The `&&` (logical AND) operator is a binary operator that performs a boolean conjunction on two scalar operands. It evaluates to `1` (of type `int`) if both operands compare unequal to zero, and `0` otherwise.

```c theme={"dark"}
expression1 && expression2
```

## Operand Requirements and Return Type

* **Operands:** Both operands must be of scalar types. This includes arithmetic types (integers, floating-point numbers) and pointers. The operands do not need to be of the same type.
* **Return Type:** The result is always of type `int`, strictly yielding either `1` (true) or `0` (false).

## Evaluation Mechanics and Short-Circuiting

The `&&` operator enforces strict left-to-right evaluation and utilizes **short-circuit evaluation**.

1. `expression1` is evaluated first.
2. If `expression1` evaluates to `0` (false), the overall result is immediately determined to be `0`. `expression2` is **not evaluated**, meaning any side effects (like function calls, increments, or assignments) within `expression2` will not occur.
3. If `expression1` evaluates to a non-zero value (true), `expression2` is evaluated. The final result depends entirely on whether `expression2` evaluates to a non-zero value.

```c theme={"dark"}
// Syntax visualization of short-circuit behavior
(0) && (side_effect()) // side_effect() is never executed
(1) && (side_effect()) // side_effect() is executed
```

## Sequence Points

There is a guaranteed **sequence point** immediately after the evaluation of `expression1`. This means all side effects of the left operand are fully realized and committed to memory before the right operand is evaluated.

```c theme={"dark"}
// Sequence point visualization
(x++ > 5) && (x < 10) 
// The increment of x is guaranteed to be complete before x is compared to 10.
```

## Precedence and Associativity

* **Precedence:** The `&&` operator has lower precedence than relational operators (like `<`, `>`), equality operators (`==`, `!=`), and bitwise operators (`&`, `^`, `|`). It has higher precedence than the logical OR operator (`||`) and assignment operators (`=`, `+=`).
* **Associativity:** It groups left-to-right. An expression like `a && b && c` is parsed as `(a && b) && c`.

```c theme={"dark"}
// Precedence visualization
a == b && c & d
// Parsed as: (a == b) && (c & d)
```

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor C Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
