Operator
|
Description
|
Associativity
|
( )
[ ] . -> ++ -- |
Parentheses
(function call)
Brackets (array subscript) Member selection in structure Member selection of structure via pointer Postfix increment/decrement |
left-to-right
|
++ --
+ - ! ~ (type) * & sizeof |
Prefix
increment/decrement
Unary plus/minus Logical negation/bitwise complement Cast (convert value to temporary value of type) Access Data via Pointer Address (of operand) Determine size in bytes on this implementation |
|
* / %
|
Multiplication/division/modulus
|
left-to-right
|
+ -
|
Addition/subtraction
|
left-to-right
|
<< >>
|
Bitwise shift
left, Bitwise shift right
|
left-to-right
|
< <=
> >= |
Relational
less than/less than or equal to
Relational greater than/greater than or equal to |
left-to-right
|
== !=
|
Relational is
equal to/is not equal to
|
left-to-right
|
&
|
Bitwise AND
|
left-to-right
|
^
|
Bitwise
exclusive OR
|
left-to-right
|
|
|
Bitwise
inclusive OR
|
left-to-right
|
&&
|
Logical AND
|
left-to-right
|
| |
|
Logical OR
|
left-to-right
|
? :
|
Ternary
conditional
|
right-to-left
|
=
+= -= *= /= %= &= ^= |= <<= >>= |
Assignment
Addition/subtraction assignment Multiplication/division assignment Modulus/bitwise AND assignment Bitwise exclusive/inclusive OR assignment Bitwise shift left/right assignment |
right-to-left
|
,
|
Comma
(separate expressions)
|
left-to-right
|
Tuesday, 8 November 2016
Operator Priority : C Language
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment