From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/CONCEPT/precedence.html | 376 ++++++++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 reference/C/CONCEPT/precedence.html (limited to 'reference/C/CONCEPT/precedence.html') diff --git a/reference/C/CONCEPT/precedence.html b/reference/C/CONCEPT/precedence.html new file mode 100644 index 0000000..71c7d81 --- /dev/null +++ b/reference/C/CONCEPT/precedence.html @@ -0,0 +1,376 @@ +Operator Precedence + + + + + +
+

Operator Precedence

+
+ + +The following tables show the order in which operators are evaluated. +Please note the following. + + + +
+ +
o +Summary table. + +
o +Table in detail. + +
o +Operators listed by type. +
+ +
+ + +

Summary precedence table.

+ +All operators on the same line have the same precedence. +The first line has the highest precedence. +

+

+ + + + + + + + + + + + + + + + + + + + +
() [] -> .
! ~ ++ -- + - * & sizeof
* / %
+ -
<< >>
< <= >= >
== !=
&
^
|
&&
||
?:
= += -= *= /= %= &= ^= |= <<= >>=
,
+
+

+ +Lary Huang has told me that the postfix unary -- and +postfix unary ++ have a +higher precedence than the prefix unary -- and +prefix unary ++. + +


+ +
+

Detailed precedence table.

+ +All operators in the same 'block' have the same precedence. The first block +has the +highest precedence. +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupOperatorDescriptionExample
+Membership. +
()Function call.count = function(4,3);
[]Array.value = array[5] + increment;
->Structure pointer.
.Structure member.
+Unary. +
!Logical NOT
~
++Increment.
--Decrement.
+
-
*Pointer to data
&Address of a variable.
sizeof
(type)type cast.
+Binary. +
* Multiply.
/ Divide.
% Modulo.
+Binary. +
+ Addition
- Subtraction.
+Bitwise +
<< Shift left.
>> Shift Right.
+Relational. +
< Less than.
> Greater than.
<= Less than or equal too.
>= Greater than or equal too.
== Equal too.
!= Not equal too.
+More Bitwise +
& bitwise AND
^ bitwise Excusive OR
| bitwise OR
+Logical. +
&& Logical AND
+Logical. +
|| Logical OR
+Conditional +
? : Conditional construct.
+Assignment +
= Equals
+= assignment
-= assignment
*= assignment
/= assignment
%= assignment
&= assignment
^= assignment
|= assignment
<<= assignment
>>= assignment
+Series +
, Comma
+
+ +

+


+

See also:

+ +o +
Expressions and operators. +
+o +Assignment Operators. +
+ + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + + -- cgit v1.2.3-54-g00ecf