-
-
Notifications
You must be signed in to change notification settings - Fork 1
Operators
Operators are symbols that are used to perform operations on variables and values in C++. Operators are used to manipulate data and variables, and they form the basis of all expressions in the language.
-
Arithmetic Operators: Arithmetic operators are used to perform mathematical operations on one or more operands. These include addition (+), subtraction (-), multiplication (*), division (/), modulus (%), and so on.
-
Relational Operators: Relational operators compare two values and return true or false depending on the result of the comparison. These include equality (==), inequality (!=), greater than (>), less than (<), greater than or equal to (>=), and less than or equal to (<=).
-
Logical Operators: Logical operators are used to create logical expressions and return true or false depending on the result of the expression. These include the AND (&&) and OR (||) operators.
-
Assignment Operators: Assignment operators are used to assign a value to a variable. These include the equal sign (=), plus equal (+=), minus equal (-=), and so on.
-
Bitwise Operators: Bitwise operators are used to perform bitwise operations on two operands. These include bitwise AND (&), bitwise OR (|), bitwise XOR (^), and so on.
-
Increment/Decrement Operators: Increment/decrement operators are used to increase or decrease a value by one. These include the increment (++) and decrement (--) operators.
-
Special Operators: Special operators are used to perform special operations on variables. These include the size of operator (sizeof) and the address of operator (&).