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:
==
(Equal to): Checks if two values are equal.!=
(Not equal to): Checks if two values are not equal.>
(Greater than): Checks if the value on the left is greater than the value on the right.<
(Less than): Checks if the value on the left is less than the value on the right.>=
(Greater than or equal to): Checks if the value on the left is greater than or equal to the value on the right.<=
(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.