Learn about different types of operators in C++, including arithmetic, relational, logical, bitwise, assignment, increment/decrement, ternary, and type casting operators.
Operator | Meaning |
---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulus (Remainder) |
true
or false
.
Operator | Meaning |
---|---|
== | Equal to |
!= | Not equal to |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
Operator | Meaning |
---|---|
= | Assign |
+= | Add and assign |
-= | Subtract and assign |
*= | Multiply and assign |
/= | Divide and assign |
%= | Modulus and assign |
Operator | Meaning |
---|---|
++ | Increment |
-- | Decrement |
if-else
statements.