Relational Operators in c

Relational operators in C are used to compare two values and determine the relationship between them. The following are the relational operators in C:

  1. == (Equal to): Checks if two values are equal.
  2. != (Not equal to): Checks if two values are not equal.
  3. > (Greater than): Checks if the value on the left is greater than the value on the right.
  4. < (Less than): Checks if the value on the left is less than the value on the right.
  5. >= (Greater than or equal to): Checks if the value on the left is greater than or equal to the value on the right.
  6. <= (Less than or equal to): Checks if the value on the left is less than or equal to the value on the right.

These operators return either 1 (true) or 0 (false) based on the evaluation of the specified condition. They are commonly used in conditional statements and loops to control the flow of a program based on certain conditions.