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

1 Answer

0 like 0 dislike
answered by (474k 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:

10.2k questions

9.2k answers

26 comments

3.2k users

Categories

Free Hit Counters
...