C++ Operators

C++ Operators

Operators are symbols used to perform operations on variables and values.

Arithmetic Operators

Arithmetic operators are used to perform common mathematical operations.

Assignment Operators

Assignment operators are used to assign values to variables.

Example

int x = 10;
x += 5; // Same as x = x + 5

Comparison Operators

Comparison operators are used to compare two values, returning a boolean (true or false).

Operators are the building blocks of any logic in your C++ applications.


Exercise

?

Which arithmetic operator is used to find the remainder of a division?