Operators in the C Programming Language

Priority Category Operator Associativity
Highest Postfix operators (), [], ->, ., ++, --, (type){initializer-list} left
  Unary prefix operators !, ~, ++, --, +, -, *, &, sizeof, _Alignof, (type) right
  Multiplicative operators *, /, % left
  Additive operators +, - left
  Bitwise shift operators <<, >> left
  Relational operators <, <=, >=, > left
  Equality operators ==, != left
  Bitwise AND & left
  Bitwise XOR ^ left
  Bitwise inclusive OR | left
  Logical AND && left
  Logical inclusive OR || left
  Conditional operator ?: right
  Assignment operators =, +=, -=, *=, /=, %=, >>=, <<=, &=, ^=, |= right
Lowest Comma operator , left

Notes:


Thomas Padron-McCarthy (thomas.padron-mccarthy@oru.se), July 1. 2013