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

41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/> Subscribe on YouTube
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