Remedial C

Michael Sierchio ducatista at camber-thrust.net
Tue Jan 25 21:52:38 PST 2005


Precedence
In general, multiply/divide come before add/subtract, and put brackets everywhere else.
Ordering of Comparisons

    1. <, <=, > and >=
    2. == and !=
    3. &&
    4. ||

Precedence of Operators

    1. () [] -> .
    2. ! ~ ++ -- unary+ unary- * (dereference) & (address) (type-cast) sizeof
    3. * (multiply) / %
    4. + (add) - (subtract)
    5. << , >>
    6. < , <= , > , >=
    7. == , !=
    8. & (bitwise and)
    9. ^
   10. |
   11. &&
   12. ||
   13. ?:
   14. = += *= /= %= &= ^= |= <<= >>=
   15. , (comma)




More information about the freebsd-ports mailing list