Arithmetic Operators in C

Ranul Navojith
3 min readNov 15, 2020

Hello everyone!!!. Here I’m going to write about arithmetic operations in the C programming language.

First, let’s have a look at what are OPERATORS and what are OPERANDS.

Ex -: a = b + c

Here ‘+’ sign is known as the ‘Operator’ and the two values of either side of the operator are known as ‘Operands’.

Types of arithmetic operators

1. Addition

2. Subtraction

3. Multiplication

4. Division

5. Modulus

6. Increment / decrement

1. Addition

+’ operator adds the two values of it’s either side. Those two values can be either constants or Variables.

2. Subtraction

’ operator subtract the two values of its either sides. This is as same as the ‘+’ operator.

3. Multiplication

The ‘ * ’ operator multiplies the two values of either side.

4. Division

The ‘ / ’ operator divides the two values of either side.

5. Modulo

The ‘ % ’ operator is known as the modulo operator. This operator returns the remainder value when one value is divided by another.

6. Increment / Decrement

If x is a variable, increment/decrement operators can be symbolized as follows.

The increment operator increases the value of the variable by 1 while the decrement operator decreases the value of the variable by 1.

Difference between postfix (x++/x — ) and prefix (++x/ — x) increment / decrement operators

In prefix increment /decrement operator, the First program will increase/ decrease the value of the given variable and assign (substitute) the value.

In the postfix increment /decrement operator, the First program will assign (substitute) the value and then increase/ decrease the value of the given variable.

That’s all about arithmetic operators in the C programming language. Hope you enjoy the article.

--

--