0% found this document useful (0 votes)
21 views1 page

Op in C++

This document describes the operator precedence and associativity in C++. It lists the operator groups from highest to lowest precedence, including brackets, function calls, postfix operators, unary operators, multiplicative operators, additive operators, bitwise shift operators, relational operators, equality operators, bitwise AND, bitwise XOR, bitwise OR, logical AND, logical OR, conditional operator, and assignment operators. Most operators associate left-to-right except for assignment, logical OR, and conditional operators, which associate right-to-left.

Uploaded by

GIRIKOPPAR
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Op in C++

This document describes the operator precedence and associativity in C++. It lists the operator groups from highest to lowest precedence, including brackets, function calls, postfix operators, unary operators, multiplicative operators, additive operators, bitwise shift operators, relational operators, equality operators, bitwise AND, bitwise XOR, bitwise OR, logical AND, logical OR, conditional operator, and assignment operators. Most operators associate left-to-right except for assignment, logical OR, and conditional operators, which associate right-to-left.

Uploaded by

GIRIKOPPAR
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Level 1 2

Operator

Description scope

::

() [] . -> ++ -- dynamic_cast static_cast postfix reinterpret_cast const_cast typeid ++ -- ~ ! sizeof new delete unary (prefix) * & + indirection and reference (pointers) unary sign operator type casting pointer-to-member multiplicative additive shift relational equality bitwise AND bitwise XOR bitwise OR logical AND logical OR conditional assignment comma

Grouping Left-toright Left-toright Right-toleft Right-toleft Left-toright Left-toright Left-toright Left-toright Left-toright Left-toright Left-toright Left-toright Left-toright Left-toright Left-toright Right-toleft Right-toleft

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

(type) .* ->* * / % + << >> < > <= >= == != & ^ | && || ?: = *= /= %= += -= >>= <<= &= ^= |= ,

You might also like