Learn more with dummies

Enter your email to join our mailing list for FREE content right to your inbox. Easy!

C Language Comparisons and Their Opposites

By Dan Gookin

Part of 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)