Advertisement
Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

Operators in C++ Programming

Part of the C++ for Dummies Cheat Sheet

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.

Operator Cardinality Associativity
Highest precedence () [] -> . unary left to right
! ~ + - ++ — & * (cast) sizeof unary left to right
* / % binary left to right
+ - binary left to right
<< >> binary left to right
< <= > >= binary left to right
== != binary left to right
& binary left to right
^ binary left to right
| binary left to right
&& binary left to right
|| binary left to right
?: ternary right to left
= *= /= %= += -= &= ^= |= <<= >>= binary right to left
Lowest precedence , binary left to right
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win an iPad Mini. Enter to win now!