> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# Relational operator of C++
- URL: https://developerinsider.co/relational-operator-of-cpp/
- Published: 2016-08-06T11:26:42.000Z
- Updated: 2018-03-29T17:01:15.000Z
- Author: Anit Kumar
- Tags: Primary, C++

#### Additional relational operators:

```
Operator                 Description               Example

  ==                      Equal to                 4==2 False
  <=                Less than or equal to          4<=2 False
  >=               Greater than or equal to        4>=2 True
  !=                     Not equal to              4!=2 True

```

**Example:**

```
if(10==10)
{
  cout<<"Yes";
}

```

**Output:**

```
Yes

```

The not equal to operator evaluates the operands, determines whether or not they are equal. If the operands are not equal, the condition is evaluated to true.  
**For example:**

```
if(10!=10)
{
  cout<<"Yes";
}
else
{
  cout<<"No";

```

**Output:**

```
No

```

You can use relational operators to compare variables in the if statement.  
**For example:**

```
int a=55;
int b=33;
if(a>b)
{
  cout<<"a is greater than b";
}

```

**Outputs:**

```
a is greater than b

```