Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Order of Operators

Order of Operators

LevelOperatorAssociativity
1() (parentheses), [] (array element), . (structure member reference)Left to right
2- (negative sign), ++ (increment), -- (decrement), & (address-of), * (pointer indirection), sizeof(), ! (the not operator)Right to left
3* (multiplication), / (division), % (modulus)Left to right
4+ (addition), - (subtraction)Left to right
5< (less than), <= (less than or equal to), > (greater than), >= (greater than or equal to)Left to right
6== (equal to), != (not equal to)Left to right
7&& (logical and)Left to right
8|| (logical or)Left to right
9? : (the conditional operator)Right to left
10=, *=, /=, %=, +=, -= (assignment operators)Right to left
11, (the comma operator)Left to right



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial