C++ Operator Precedence Table, Schemes and Mind Maps of Computer Science

One to one operator precedence table of c++ in one page.

Typology: Schemes and Mind Maps

2024/2025

Uploaded on 01/03/2025

hamza-anjum
hamza-anjum 🇵🇰

8 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Operator Precedence and Associativity in C++
Precedence Operator Type Operators Associativity
1 Scope resolution :: Left-to-right
2 Postfix ++ -- () [] . -> Left-to-right
3 Unary ++ -- + - ! ~ * & sizeof Right-to-left
4 Pointer-to-member .* ->* Left-to-right
5 Multiplicative * / % Left-to-right
6 Additive + - Left-to-right
7 Shift << >> Left-to-right
8 Relational < <= > >= Left-to-right
9 Equality == != Left-to-right
10 Bitwise AND & Left-to-right
11 Bitwise XOR ^ Left-to-right
12 Bitwise OR | Left-to-right
13 Logical AND && Left-to-right
14 Logical OR || Left-to-right
15 Conditional ?: Right-to-left
16 Assignment = += -= *= /= %= <<= >>= &= ^= |= Right-to-left
17 Comma , Left-to-right

Partial preview of the text

Download C++ Operator Precedence Table and more Schemes and Mind Maps Computer Science in PDF only on Docsity!

Operator Precedence and Associativity in C++

Precedence Operator Type Operators Associativity 1 Scope resolution :: Left-to-right 2 Postfix ++ -- () []. -> Left-to-right 3 Unary ++ -- + -! ~ * & sizeof Right-to-left 4 Pointer-to-member .* ->* Left-to-right 5 Multiplicative * / % Left-to-right 6 Additive + - Left-to-right 7 Shift << >> Left-to-right 8 Relational < <= > >= Left-to-right 9 Equality == != Left-to-right 10 Bitwise AND & Left-to-right 11 Bitwise XOR ^ Left-to-right 12 Bitwise OR | Left-to-right 13 Logical AND && Left-to-right 14 Logical OR || Left-to-right 15 Conditional ?: Right-to-left 16 Assignment = += -= *= /= %= <<= >>= &= ^= |= Right-to-left 17 Comma , Left-to-right