DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C language compiler

Associativity and precedence of operators

Operators Associativity
() [] -> \. left to right
! ~ ++ -- + - * & (type) sizeof right to left
* / % left to right
+ - left to right
<< >> left to right
< <= > >= left to right
== != left to right
& left to right
^ left to right
| left to right
&& left to right
|| left to right
?: right to left
= += -= *= /= %= &= ^= |= <<= >>= right to left
, left to right
Unary +, -, and * have higher precedence than their binary versions.

Prefix ++ and -- have higher precedence than their postfix versions.


Next topic: Constant expressions
Previous topic: Structure operators

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003