C++ Operators

Operators in C++

In order to perform various operations certain symbols are used that are known as operators in C++.

Here are the lists of operators in the C++ language that are used to perform different operations:

Arithmetic Operators

Assignment Operator

Relational Operators

Logical Operators

Unary operator

Bitwise Operators

Ternary or Conditional Operator

Misc Operator

Types

Symbol

Arithmetic Operator

+,-,/,*,%

Relational Operator

<, <=, >, >=,== ,!=

Logical Operator

&& || !

Bitwise Operator

& | << >> ^

Assignment Operator

=,+=,-=,*=,/=,%=

Unary Operator

++,--

Ternary Operator(Conditional)

?:

Precedence of Operators in C++

In order to specify the sequence of evaluation of the operators that which will be first and next, the precedence of operators is used. The direction of the operators that is to be evaluated is specified by the associativity and it can be from right to left or vice versa.