Operators are specialized symbols that perform mathematical and logical operations on variables & symbols known as operands.
Following are the Types of Operators in C++:
These operators carry out basic mathematical operations such as addition, subtraction, multiplication, and division.
They're also known as comparison operators. They compare the values of the two operands. The comparison produces one of two results: true or false. If the comparison is successful, it returns 1; if the comparison fails, it returns 0. These are referred to as boolean values.
They're used to combine two or more conditions or limitations. It results in 0 or 1 based on whether the expression is true or false. If the result is true, it returns 1. Otherwise, it returns 0. Logical operators are used to make decisions and create looping sentences.
These operators work with individual bits. The operands are first transformed into bits, such as 0 or 1 before the calculation is done on them.
These are used to provide values for the variables. The most fundamental assignment operator is equal (=).
This is also known as a ternary operator. It works with three operands. The ternary operator is used to execute one group of statements when the test expression is true and another set of statements when it is false.