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

Precedence Table

Operator precedence in C/C++ determines the order in which operators are evaluated. Parentheses, square brackets, function calls, and member access 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, followed by multiplication, division, and modulus from left to right. Addition and subtraction are evaluated left to right, followed by bitwise shifts, comparison operators, logical AND, logical OR, ternary conditional operator, and assignment operators from right to left. The comma operator has the lowest precedence and is evaluated left to right.

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)
23 views1 page

Precedence Table

Operator precedence in C/C++ determines the order in which operators are evaluated. Parentheses, square brackets, function calls, and member access 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, followed by multiplication, division, and modulus from left to right. Addition and subtraction are evaluated left to right, followed by bitwise shifts, comparison operators, logical AND, logical OR, ternary conditional operator, and assignment operators from right to left. The comma operator has the lowest precedence and is evaluated left to right.

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