[comp.lang.c] precedences of C operators

mike@iotek.UUCP (Mike Thompson) (09/19/89)

	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: mike@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 :-)