C++20 sections · 1024 units
Open in Course

What is an Operator?

Operators transform values

An operator is a symbol that tells C++ to perform a specific computation. When you write 5 + 3, the + is an operator that adds two numbers. Without operators, you cannot modify or compare data.

Each operator works with one or more operands. In a * b, the * is the operator and a and b are operands. The operator acts on its operands to produce a result. C++ provides operators for arithmetic, comparison, logic, and assignment.

I will show you how each category works and when to apply them.