Comparison operators are also termed as . . . . . . . .

Comparators
Comparables
Relations
Relational operators

The correct answer is D. Relational operators.

Relational operators are used to compare two values and return a Boolean value (true or false). The most common relational operators are:

  • Equal to (==)
  • Not equal to (!=)
  • Greater than (>)
  • Greater than or equal to (>=)
  • Less than (<)
  • Less than or equal to (<=)

Relational operators can be used in a variety of ways, such as:

  • To compare the values of two variables:

if (x == y) {
// Do something
}

  • To compare the value of a variable to a constant:

if (x > 10) {
// Do something
}

  • To compare the values of two expressions:

if ((x + y) > 10) {
// Do something
}

Relational operators are an essential part of programming, and they are used in a variety of different programming languages.

Exit mobile version