c operator precedence and order of evaluation table in tbl
Peter Brouwer
pb at idca.tds.PHILIPS.nl
Wed Jan 17 19:14:47 AEST 1990
Here is a a table of the evaluation order of c operators , use tbl and
[nt]roff to print.
.TS
center box tab(;);
cp16B s s s s s s s s s
cp16B s s s s s s s s s
cp14I s s s s s s s s | cp14I
cp15 cp15 cp15 cp15 cp15 cp12 cp15 cp15 cp12 | l.
Precedence and order of evaluation
\^
=
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;
_
=;+=;-=;etc;;;;;;right to left;
_
,;;;;;;;;;left to right;
.TS
--
Peter Brouwer, # Philips Telecommunications and Data Systems,
NET : pb at idca.tds.philips.nl # Department SSP-P9000 Building V2,
UUCP : ....!mcvax!philapd!pb # P.O.Box 245, 7300AE Apeldoorn, The Netherlands.
PHONE:ext [+31] [0]55 432523, #
More information about the Comp.lang.c
mailing list