An operator is simply a symbol that is used to perform operations.
There can be many types of operations like arithmetic, logical, bitwise etc.
There are following types of operators to perform different types of operations in C language.
1.Arithmetic Operators
2.Relational Operators
3.Shift Operators
4.Logical Operators
5.Bitwise Operators
6.Ternary or Conditional Operators
7.Assignment Operator
8.Misc Operator
| Category | Operator | Associativity |
|---|---|---|
| Postfix | () [] -> . ++ - - | Left to right |
| Unary | + - ! ~ ++ - - (type)* & sizeof | Right to left |
| Multiplicative | *, /, % | Left to right |
| Additive | + ,- | Left to right |
| Shift | << ,>> | Left to right |
| Relational | < <=, > >= | Left to right |
| Equality | == ,!= | Left to right |
| Bitwise AND | & | Left to right |
| BitwiseXOR | ^ | Left to right |
| Bitwise OR | | | Left to right |
| Logical AND | && | Left to right |
| Logical OR | || | Left to right |
| Conditional | ?: | Right to left |
| Assignment | =, +=, -=, *= ,/=, %=,>>=, <<=, &=, ^=, |= | Right to left |
| Comma | , | Left to right |
© . All rights reserved. | Powered by Integration IT services Pvt.Ltd. | Design by Deepak Shrivastava