Operator precedence and associativity rules in c / c ========================================= ======================================================================================================================================================================================================================================================================, TO-Right :: Global (C , Eg :: Name) ------------------------------------ ---------------------------------------- () Function Call Left-to-Right [ Array Element. Class, Structure or Union Member -> Scope Access / Resolution (C ) SizeOf Size Object in bytes SizeOf Size Of Type in Bytes ------------- -------------------------------------------------- ------------- Post Increment (Lvalue ) Right-to-Left Pre Increment ( Lvalue) - Post Decrement (LVALUE -) - Pre DCREMENT (- Lvalue) ~ Bitwise Complement! Logical Not - Unary Minus Unary Plus & Address of * Contents of New Create Object (C ) Delete Destroy Object (C ) delete [] Destroy Array (C ) (Type) Cast to Type ------------------------------------------------------------------------------------------------------------ -------------------------------------------------- --------. * MEMBER POINTER (C ) Left-to-right ->
* Pointer Reference to Member Pointer (C ) ----------------------------------------- ----------------------------------- * Multiply Left-to-right / Divide% Remainder ---- -------------------------------------------------- ---------------------- Add Left-to-Right - Subtract ------------------- -------------------------------------------------- ------- << Bitwise Left shift left-to-right >> Bitwise Right Shift ---------------------------- ------------------------------------------------
Logical and left-to-right ------------------------------------------- --------------------------------- || Logical Inclusive or Left-to-Right ------- -------------------------------------------------- -------------------?: Conditional Expression Right-to-Left ---------------------- -------------------------------------------------- ---- = Assignment Operator Right-to-Left Also = - = * = / =% = & = ^ = | = >> = << = --------------- -------------------------------------------------- -----------, SEQUENTIAL Expression Left-to-Right ------------------------------- -------------------------------------------- All of the Operators in This Table Can Be overloaded (C ) Except:
. C Direct Component Selector. * C Dereference :: C Scope Access / Resolution?: Conditional