This blog is under construction

Saturday, 18 January 2014

Operator precedence and associativity in C language

Below is the table for operator precedence and associativity in C programming language.
[ ]
( )
++ --
Array subscript
Function Call
Structure reference
Structure dereference
Postfix increment/Postfix decrement

Left to right
++ --
+ -
! ~
*  &
Prefix increment/Prefix decrement
Unary plus/Unary minus
Logical negation/One's complement
Typecast operator
Pointer dereference/Address of
Size of type/variable in bytes

Right to left
*  /  % Multiplication/Division/Modulo Left to Right
+ - Addition/Subtraction Left to Right
<<   >> Bitwise left shift/ Bitwise right shift Left to Right
<    >
Comparison less than/Comparision greater than
Comparison less than or equal to
Comparison greater than or equal to

Left to Right
==   != Comparison equal to/Comparison not equal to Left to Right
& Bitwise AND Left to Right
^ Bitwise XOR Left to Right
| Bitwise OR Left to Right
&& Logical AND Left to Right
|| Logical OR Left to Right
?: Ternary Conditional Operator Right to Left
*=    /=   %=
+=    -=
<<=   >>=
&=    ^=
Assignment Operator
Mulplication/division/modulo assignment
Addition/Subtraction assignment
Bitwise left shift/right shift assignment
Bitwise AND/XOR assignment
Bitwise OR assignment

Right to Left
, Comma Operator Left to Right


  1. controversial debate topics How to debate, topics for debate, good debate topics, topics to debate & controversial debate topics. Debate offers the world a tool that could not be timelier or more necessary.

  2. cursos para excel - Buscando cursos para Excel? Jirafales es tú fuente en línea para cursos de Excel. Ofrecemos tres niveles de cursos en video para Excel: Básico, Intermedio y Avanzado.

  3. This comment has been removed by the author.

  4. Learn C C# Algorithms at

  5. Total Video Converter for Mac Total Video Converter for Mac is the best all-in-one Video Converter for Mac! With this ultra-fast Mac Video Converter,you can convert any video formats and burn your video to an optional DVD disc!
    Paint.Net Mac Paint.Net for Mac like MyBrushes, Pinta, and GIMP are
    some equivalents digital artists can choose to use Paint.Net Mac.

  6. Good
    Here is a link for C/C++ programs and pointer programs. This may be useful for you.

    C/C++ Programs