Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

precedences of C operators

3 views
Skip to first unread message

Mike Thompson

unread,
Sep 19, 1989, 11:42:04 AM9/19/89
to

Several years ago when I was taking a compiler course I took a
BNF definition of the C syntax and derived the following
precedence table. This table seems to jive with the K&R bible.

Operator 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
--
<<<<<<******>>>>>>
Michael A. Thompson, Iotek Inc, |*| E-Mail: mi...@iotek.uucp |*| Have
1127 Barrington St., Suite 100, |*| Fax: (902)420-0674 |*| a Good
Halifax, N.S., B3H 2P8, Canada |*| Phone: (902)420-1890 |*| Day :-)

0 new messages