It is important to understand that operators have a precedence, but it is not essential to memorize the precedence.
New Term: Precedence is the order in which a program performs the operations in a formula. If one operator has precedence over another operator, it is evaluated first.
Higher precedence operators "bind tighter" than lower precedence operators; thus, higher precedence operators are evaluated first. The lower the rank in the following chart, the higher the precedence.
Table A.1. Operator Precedence.
|2||member selection, subscripting,||. ->|
|and decrement||++ --|
|3||sizeof, prefix increment and decrement,||++ --|
|complement, and, not, unary minus and plus,||^ !|
|address of and dereference, new, new, delete,||- +|
|delete, casting, sizeof(),||& *|
|4||member selection for pointer||.* ->*|
|5||multiply, divide, modulo||* / %|
|6||add, subtract||+ -|
|8||inequality relational||< <= > >=|
|9||equality, inequality||== !=|
|11||bitwise exclusive OR||^|
|16||assignment operators||= *= /= %=|
|+= -= <<= >>=|
|&= |= ^=|
Related Results :
- Basic Operators
- Common Operators
- Variables and Operators
- Operators , Loop , Storage & Debugging
- Brief Introduction - Hello World
- Operator Precedence
- C++ Keywords
- Program , Functions , Comments
- Expressions and Statements
- Related Posts are generally User Blog posts.
- or Other tutorials from other networks of w3clan.com.
- Any registered user can create related posts based on search term tags.