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

Precedence Table

Operator precedence in C/C++ determines the order in which operators are evaluated. Parentheses, brackets, and dots have the highest precedence and are evaluated from right to left. Unary operators like increment, decrement, logical NOT, and bitwise NOT are evaluated left to right. Binary operators like multiplication, division, modulus, addition, subtraction, bitwise shifts, relational comparisons, equality comparisons, bitwise AND, bitwise OR, logical AND, logical OR, and ternary operator are evaluated left to right. Assignment operators are evaluated right to left.

Uploaded by

Project Tims
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Precedence Table

Operator precedence in C/C++ determines the order in which operators are evaluated. Parentheses, brackets, and dots have the highest precedence and are evaluated from right to left. Unary operators like increment, decrement, logical NOT, and bitwise NOT are evaluated left to right. Binary operators like multiplication, division, modulus, addition, subtraction, bitwise shifts, relational comparisons, equality comparisons, bitwise AND, bitwise OR, logical AND, logical OR, and ternary operator are evaluated left to right. Assignment operators are evaluated right to left.

Uploaded by

Project Tims
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Precedence of operators

Operators Associativity
( ) , [ ] , . , -> R->L
++ , -- , ! , ~ , sizeof L->R
*,/,% L->R
+,- L->R
<< , >> L->R
< , <= , > , >= L->R
== , != L->R
&(Bitwise AND) L->R
|(Bitwise OR) L->R
&&(Logical AND) L->R
||(Logical OR) L->R
? : (Conditional Operator) R->L
= , += , -=(Assignment Operator) R->L
, (Comma) L->R

You might also like