0% found this document useful (0 votes)
9 views

C- Language Operator Precedence and Associativity Table

The document provides a table detailing the operator precedence and associativity in the C programming language. It lists operators in order of priority, along with their associativity direction, indicating how expressions are evaluated. The table includes various categories of operators such as arithmetic, relational, bitwise, and logical operators.

Uploaded by

Raj Aulakh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

C- Language Operator Precedence and Associativity Table

The document provides a table detailing the operator precedence and associativity in the C programming language. It lists operators in order of priority, along with their associativity direction, indicating how expressions are evaluated. The table includes various categories of operators such as arithmetic, relational, bitwise, and logical operators.

Uploaded by

Raj Aulakh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C- Language Operator Precedence and Associativity Table

Precedence and Associativity in C Language

Priority Operator Associativity


1 [ ] (Subscript), Left to Right (L → R)
( ) (Bracket operator)
2 . (Dot operator), Left to Right (L → R)
-> (Arrow
membership)
3 Unary operators (+, -, Right to Left (R → L)
++, --, ~, sizeof(),
typecast),
Address of (&), Value
at
at
4 Arithmetic (*, /, %) Left to Right (L → R)
5 Arithmetic (+, -) Left to Right (L → R)
6 Shift operators (<< Left to Right (L → R)
Left Shift, >> Right
Shift)
7 Relational operators Left to Right (L → R)
(<, <=, >, >=)
8 Equality operators Left to Right (L → R)
(==, !=)
9 Bitwise AND (&) Left to Right (L → R)
10 Bitwise XOR (^) Left to Right (L → R)
11 Bitwise OR (|) Left to Right (L → R)
12 Logical AND (&&) Left to Right (L → R)
13 Logical OR (||) Left to Right (L → R)
14 Conditional operator Right to Left (R → L)
(?:)
15 Assignment operators Right to Left (R → L)
(=, +=, -=, *=, /=, %=)
16 Comma operator (,) Left to Right (L → R)

You might also like