answersLogoWhite

0

What is a comparative operator?

Updated: 12/22/2022
User Avatar

Wiki User

7y ago

Best Answer

Comparative operators are used to compare the logical value of one object with another and thus establish the rank (ordering) of those objects.

There are six comparative operators in total:

p<q : evaluates true when p is less than q

p>q : evaluates true when p is greater than q

p<=q : evaluates true when p is less than or equal to q

p>=q : evaluates true when p is greater than or equal to q

p!=q : evaluates true when p is not equal to q

p==q : evaluates true when p is equal to q

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a comparative operator?
Write your answer...
Submit
Still have questions?
magnify glass
imp