Click the blue
Follow us![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/e84270fc-0945-4cba-adc3-c3d9d8901559.gif)
C++ Basic Knowledge 003 – Summary of Operators01Arithmetic Operators
In C++, arithmetic operators are used to perform basic mathematical operations, including addition, subtraction, multiplication, and division. Below are some commonly used arithmetic operators and their usage:
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/eec6f81c-784e-4f77-b68e-721815c88bbc.gif)
02Compound Operators
In C++, compound operators provide a convenient way to combine assignment operations with another operation. They allow you to assign the result of an operation directly to a variable, thus reducing code redundancy. Compound operators are commonly used for addition (+=), subtraction (-=), multiplication (*=), division (/=), and modulus (%=) operations.
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/5e744f1f-4c36-4f8a-859a-6648ae2f2ec5.gif)
03Relational Operators
In C++, relational operators are used to compare the sizes of two values. These operators return a boolean value (<span>true</span> or <span>false</span>), indicating the result of the comparison. Here are some commonly used relational operators in C++:
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/c7a19398-b443-4ace-bec1-828b5bc791c3.gif)
04Logical Operators
Logical operations in C++ are a type of operator used to control program flow and conditional judgment logic. The classification of logical operators is as follows:
Logical AND (&&): The result is true when all conditions are true
Logical OR (||): The result is true when at least one condition is true
Logical NOT (!): Negates the condition
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/bc9a75fb-edbb-4b5c-92a8-0002911b2571.gif)
05Conditional Operator
The conditional operator (also known as the ternary operator) in C++ is a concise conditional expression that can replace if-else statements. Its basic syntax is as follows:
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/2e207ab4-d382-4f16-88f9-7127aa1ca3a7.gif)
06Increment and Decrement Operators
Pre-increment ++C [increment before use]
Pre-decrement –C [decrement before use]
Post-increment C++ [use before increment]
Post-decrement C– [use before decrement]
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/a4274e65-78e2-4278-a708-ae5a508958a2.gif)
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/8b292ea0-a8e2-4906-9b08-b0523ce45b1f.png)
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/8b66d0b1-ed09-4235-b160-bd6ee101d406.png)
Youth Programming StudioWeChat ID: yy18337897171
Focus on Children’s Growth
Cultivate Innovative Abilities
![C++ Basic Knowledge 003 [Notes Version - Summary of Operators]](https://boardor.com/wp-content/uploads/2025/11/90da9acc-a364-4cb8-91a0-9845a5a60056.png)