Operators in C++ Programming

All operators in C++ perform some defined function. This table shows the operator, precedence (which determines who goes first), cardinality, and associativity in the C++ program.
































































































































OperatorCardinalityAssociativity
Highest precedence() [] -> .unaryleft to right

! ~ + - ++ — & * (cast) sizeofunaryleft to right

* / %binaryleft to right

+ -binaryleft to right

<< >>binaryleft to right

< <= > >=binaryleft to right

== !=binaryleft to right

&binaryleft to right

^binaryleft to right

|binaryleft to right

&&binaryleft to right

||binaryleft to right

?:ternaryright to left

= *= /= %= += -= &= ^= |= <<= >>=binaryright to left
Lowest precedence,binaryleft to right








dummies

Source:http://www.dummies.com/how-to/content/operators-in-c-programming.html

No comments:

Post a Comment