What are different operators in C++?

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.

  • Arithmetic Operators + -, * etc
  • Relational Operators < = > <= >=
  • Logical Operators && ||
  • Bitwise Operators ^ | &
  • Assignment Operator = =+ =-
  • Unary operator + -
  • Ternary or Conditional Operator ?:
  • Misc Operator

The precedence of operator species that which operator will be evaluated first and next. The associativity specifies the operators direction to be evaluated, it may be left to right or right to left.