---
title: "3.11 Logical OR Operator (||)"
description: "The logical OR operator (`||`) combines two Boolean expressions and returns `true` if at least one of the expressions evaluates to `true`. The result is `false` only when both expressions evaluate to `false`. The logical OR operator is commonly used…"
url: "https://edcret.in/docs/cpp-programming/operators-cplusplus/3-11-logical-or-operator/"
updated: "2026-07-28"
category: C++ Programming / Operators
---

# 3.11 Logical OR Operator (||)

The logical OR operator (`||`) combines two Boolean expressions and returns `true` if at least one of the expressions evaluates to `true`. The result is `false` only when both expressions evaluate to `false`.

The logical OR operator is commonly used when a program should perform an action if any one of multiple conditions is satisfied.

## Source Code

```
#include <iostream>

int main()
{
    int marks = 85;
    bool sports_quota = false;

    bool eligible = (marks >= 90) || sports_quota;

    std::cout << "Eligible: " << eligible << '\n';

    return 0;
}
```

## Output

```
Eligible: 0
```

## Explanation

- The logical OR operator (`||`) combines two Boolean expressions.
- It returns `true` if at least one operand evaluates to `true`.
- It returns `false` only when both operands evaluate to `false`.
- `(marks >= 90)` checks whether the marks satisfy the required condition.
- `sports_quota` represents another condition that can independently satisfy the eligibility criteria.
- The expression `(marks >= 90) || sports_quota` evaluates to `true` if either condition is satisfied.
- By default, `std::cout` displays Boolean values as `1` for `true` and `0` for `false`.
- `return 0;` terminates the program successfully.
