 # Arithmetic Operators in C++

In this article, we are going to learn about arithmetic operators in C++. As the name says, Arithmetic operators are the operators, which are used to perform arithmetic operations on the data, like addition, subtraction, multiplication, division, etc.

## Arithmetic Operators in C++

In the below table, you can find the different arithmetic operator symbols, and then we will also perform a simple program to understand the arithmetic operators. For sake of example in the table, consider a = 10 and b = 5.

As you can see in the above table, we have listed the arithmetic operator symbols, which can be used to carry out some arithmetic operations, like addition, subtraction, multiplication, division, etc.

Let’s have a look at a simple program, in which, we will try to perform these different arithmetic operations.

#include <iostream>

int main()
{
int a = 10, b = 2;
std::cout << “Addition Operation:”<<a+b << std::endl;
std::cout << “Subtraction Operation:”<<a-b << std::endl;
std::cout << “Multiplication Operation:”<<a*b << std::endl;
std::cout << “Division Operation:”<<a/b << std::endl;
std::cout << “modulus Operation:”<<a%b << std::endl;
std::cout << “Increment Operation:”<<++a << std::endl; // pre-increment
std::cout << “Decrement Operation:”<<–b<< std::endl;//pre-decrement

return 0;
}

If you try to execute the above program, this is the output that you get.

Subtraction Operation:8
Multiplication Operation:20
Division Operation:5
modulus Operation:0
Increment Operation:11
Decrement Operation:1

As you can see, we were able to do some arithmetic operations on the data, and as and when required, you can make use of these operator symbols, to perform these arithmetic operations.

Note that with the unary increment and decrement operators, we have things like pre-increment, post-increment, and pre-decrement and post decrement. In the above program, we are doing pre-operations. You can explore more about that.

### Q: What are arithmetic operators in C++?

Ans: Using the arithmetic operators, we can perform some arithmetic operations, like addition, subtraction, multiplication, division, etc.

### Q: What are the different arithmetic operator symbols in C++?

Ans: The arithmetic operator symbols in C++ include the following symbols – (+, -, *, /, %, ++, –)