Skip to content Skip to navigation


You are here: Home » Content » Abbreviated Precedence Chart for C++ Operators


Recently Viewed

This feature requires Javascript to be enabled.


(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Abbreviated Precedence Chart for C++ Operators

Module by: Kenneth Leroy Busbee. E-mail the author

Summary: An abbreviated precedence chart for C++ operators typically used in a modular structured programming fundamentals course.

Note: You are viewing an old version of this document. The latest version is available here.

An operator is a language-specific syntactical token (one or more symbols) that causes an action to be taken on one or more operands. The following item provides an abbreviated list of those C++ operators that are typically taught in a programming fundamentals course that teaches modular structured programming concepts.

The first column shows the precedence (the higher precedence is 1 or it goes first) and operators that have the same precedence also have the same associativity (the associativity is only listed once for the group of operators). Decrement is two minus signs, but some word processoring software programs might have have problems printing to minus signs and convert it to a double dash. Insertion (two < signs) and extraction (two > signs) might also hve printing problems. These printing problems are noted in the comments.

Table 1
1 function call ()   Left to Right
1 array index []    
2 postfix increment ++ unary Right to Left
2 postfix decrement -- unary, two minus signs  
3 dereference * unary Right to Left
3 address & unary  
3 unary positive + unary  
3 unary minus or unary negative - unary  
3 prefix increment ++ unary  
3 prefix decrement -- unary, two minus signs  
3 cast (type) unary  
3 sizeof sizeof (type) unary, compile time  
3 logical NOT ! unary  
4 multiply *   Left to Right
4 divide /    
4 modulus % remainder  
5 add +   Left to Right
5 subtract -    
6 insertion << writing, two < signs Left to Right
6 extraction >> reading, two > signs  
7 less than <   Left to Right
7 greater than >    
7 less than or equal to <=    
7 greater than or equal to >=    
8 equality == equal to Left to Right
8 non-equality != not equal to  
9 logical AND &&   Left to Right
10 logical OR ||   Left to Right
11 conditional ? : trinary Left to Right
12 assignment =   Right to Left
12 addition assignment +=    
12 subtraction assignment -=    
12 multiplication assignment *=    
12 division assignment /=    
12 modulus assignment %=    
13 sequence or comma ,   Left to Right

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens


A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks