0 like 0 dislike
4 views
asked ago in Computer Science by (69.7k points)
Define relational expression and relational operator. Discuss relational operators with examples

1 Answer

0 like 0 dislike
answered ago by (69.7k points)
Operator             Description                                                         Example

==                 Checks if the values of two operands are equal or not. If yes, then the condition becomes true.                                                                                                          (A == B) is not true.  

!=                   Checks if the values of two operands are equal or not. If values are not equal then the condition becomes true.                                                                       (A != B) is true.

>                    Checks if the value of left operand is greater than the value of right operand. If yes, then the condition becomes true.                                                      (A > B) is not true

<                    Checks if the value of left operand is less than the value of right operand. If yes, then the condition becomes true.                              (A < B) is true

>=                 Checks if the value of left operand is greater than or equal to the value of right operand. If yes, then the condition becomes true.                  (A >= B) is not true.

<=                      Checks if the value of left operand is less than or equal to the value of right operand. If yes, then the condition becomes true.                  (A <= B) is true.
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute:

3.1k questions

2.6k answers

18 comments

2.7k users

...