If you’re writing programs in C, you need to use comparison symbols. The symbols C uses, their meanings, and examples are shown in the following table:
Symbol | Meaning or Pronunciation | True Comparison Examples |
---|---|---|
< | Less than | 1 < 5 8 < 9 |
== | Equal to | 5 == 5 0 == 0 |
> | Greater than | 8 > 5 10 > 0 |
<= | Less than or equal to | 4 <= 5 8 <= 8 |
>= | Greater than or equal to | 9 >= 5 2 >= 2 |
!= | Not equal to | 1 != 0 4 != 3.99 |
dummies
Source:http://www.dummies.com/how-to/content/c-language-comparison-symbols.html
No comments:
Post a Comment