What is the order of precedence of operators in the C p…
The priority of operations in the C language is ranked from high to low as follows:
- parentheses symbol ()
- Unary operators ++ and — (prefix form)
- Unary operators: +, – (unary addition and subtraction)
- Typecast operator.
- Address-of operator &
- dereference operator *
- Array index operator []
- Member operators of structure/union.
- Pointer operator -> for struct/union members.
- multiplication operator *, division operator /
- Addition symbol +, subtraction symbol –
- Shift operators <<, >>
- Relational operators <, <=, >, >=
- Equality operators “==,” “!=”
- bitwise operator &
- The exclusive OR operator ^
- Bitwise OR operator
- Logical operator &&
- logical OR operator ||
- Ternary operator ? :
- Assignment operators include =, +=, -=, *=, /=, %=, <<=, >>=, &=, ^=, and |=.
- comma operator