Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
C Operators: Order of Precedence
◄C Operators► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The CodeView C expression operators are listed in order of
precedence. The rules separate precedence levels.
Symbol Name or Meaning
─────────────────────Highest Precedence───────────────────────────
( ) Grouping operands or function call
:> Base operator
[ ] Array element
. Structure or union member
-> Pointer to structure member
──────────────────────────────────────────────────────────────────
! Logical NOT
~ One's complement
- Minus
++ Increment
── Decrement
& Address
* Indirection
(type) Type cast [for example, (float) i]
sizeof Size in bytes
──────────────────────────────────────────────────────────────────
* Multiply
/ Divide
% Remainder
: Segment/offset
──────────────────────────────────────────────────────────────────
+ Add
- Subtract
──────────────────────────────────────────────────────────────────
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
──────────────────────────────────────────────────────────────────
== Equal
!= Not equal
──────────────────────────────────────────────────────────────────
&& Logical AND
──────────────────────────────────────────────────────────────────
|| Logical OR
──────────────────────────────────────────────────────────────────
?: Conditional
──────────────────────────────────────────────────────────────────
= Assignment
*=, /=, Compound assignment
%=, +=,
-=
──────────────────────────────────────────────────────────────────
BY Byte
WO Word
DW Doubleword
──────────────────────Lowest Precedence───────────────────────────
-♦-