What does the '==' operator do in C?

The '==' operator checks if two values are equal. It returns 1 (true) if the values are equal, and 0 (false) if they are not.

What does the '!=' operator do in C?

The '!=' operator checks if two values are not equal. It returns 1 (true) if the values are different, and 0 (false) if they are the same.

What does the '>' operator do in C?

The '>' operator checks if the left operand is greater than the right operand. It returns 1 (true) if the left operand is greater, and 0 (false) otherwise.

What does the '<' operator do in C?

The '<' operator checks if the left operand is less than the right operand. It returns 1 (true) if the left operand is less, and 0 (false) otherwise.

What does the '>=' operator do in C?

The '>=' operator checks if the left operand is greater than or equal to the right operand. It returns 1 (true) if the left operand is greater or equal, and 0 (false) otherwise.

What does the '<=' operator do in C?

The '<=' operator checks if the left operand is less than or equal to the right operand. It returns 1 (true) if the left operand is less or equal, and 0 (false) otherwise.

What is the precedence of relational operators in C?

The relational operators ('<', '<=', '>', '>=') have lower precedence than arithmetic operators and higher precedence than the equality operators ('==' and '!=').

In what contexts are relational operators typically used in C?

Relational operators are commonly used in conditional statements (like if, while, and for) to control the flow of the program based on comparisons between values.