C Language Comparisons and Their Opposites

Part of the C For Dummies Cheat Sheet

If you’re programming in C — or any other language — you need to use If/Else statements. The comparison symbols you need if you’re working with C and the Else statements they generate are shown in the following table:

If Comparison Else Statement Executed By This Condition
< >= (Greater than or equal to)
== != (Not equal to)
> <= (Less than or equal to)
<= > (Greater than)
>= < (Less than)
!= == (Equal to)
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
C For Dummies Cheat Sheet

Advertisement

Inside Dummies.com