# Arithmetic Operators in C Language ( + _ * / % ) with Example program

## Introduction:

So far We have discussed about the building blocks of the C Programming Language. Like the datatypes, variables, keywords, and Constants, etc. We also discussed about the Operators in C Language. Now In todays article, We are going to look about the Arithmetic Operators in C Language with Examples.

## Arithmetic Operators in C Language ( + Â ,- , * , / , % ):

- The Arithmetic Operators in C are used for
__Numeric calculations (or) Arithmetic Calculations.__ - There are Five Arithmetic Operator in C language. those are listed below

Operator | Meaning | Example |
---|---|---|

+ | Addition | 200 + 100 = 300 |

- | Subtraction | 200 - 100 = 100 |

* | Multiplication | 200 * 100 = 20000 |

/ | Division | 200 / 100 = 2 |

% | Modulo Division | 200 % 100 = 0 |

When we are usingÂ **+** and** â€“** symbols it may Binary operators or Unary Operators. It is depends on Number of Operands.because we have unary **Â + , â€“** Operators and BinaryÂ **+ , â€“ **Operators.

### Unary + and Unary â€“ Operators:

- Unary operators requires only one Operand
- unary operators are used for representing sign of operand.

Ex :

+a Â â€”-> Â a is Positive value.

-b Â â€”-> Â b is Negative value.

- If we didnâ€™t specify any sign before the any Number it is considered as Positive Number.

### Binary + and Binary â€“ Operators:

- These operators are need two operands.
- Binary plus is used for addition.
- Binary minus is used for Subtraction.

### Product Operator:

- It is used to perform Arithmetic Multiplication between given Operands.
- It is also a Binary operator.

### Division Operator:

- It is used to perform the division between two operands and it gives the Coefficient as Result.
- It is also Binary Operator.

### Modulo Division Operator:

- It is used for perform modulus operation it gives remainder as Result.
- It is also a Binary Operator.
- we can not apply modulus operator on Floating point data. It is only for Integers.

## Program to demonistrate Arithmetic Operators in C language:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include<stdio.h> int main(void) { Â Â Â Â int a,b; Â Â Â Â Â printf("Enter Value for a : "); Â Â Â Â scanf("%d", &a); Â Â Â Â printf("Enter Value for b : "); Â Â Â Â scanf("%d", &b); Â Â Â Â Â // Perform Arithmetic operations on variable 'a' and 'b' Â Â Â Â printf("Sum=%d \n", a+b); Â Â Â Â printf("Difference=%d \n", a-b); Â Â Â Â printf("Product=%d \n", a*b); Â Â Â Â printf("Quotient=%d \n", a/b); Â Â Â Â printf("Remainder=%d \n", a%b); Â Â Â Â Â return 0; Â } |

### Program Output:

## Quick Notes on Arithmetic Operators in C :

- All Arithmetic Operators are Binary Operators that means it needs two Operands to perform any operation.
- Unary plus and Minus are Different from Binary plus(Addition Operator) and Binary minus(subtraction Operator).

If we have more than one Operator in an Expression we need to follow Priority of Operators and Associativity of Operators.Operators with more than one Operators are explainedÂ in the following post.

__Also Read :__

__Also Read :__

## 5 Responses

[â€¦] Arithmetic Operators in C Language | Examples of Arithmetic Operators â€“ SillyCodes [â€¦]

[â€¦] our previous articles, we discussed the Arithmetic Operators in C Language. In todayâ€™s article, We will learn about the Assignment Operator in C Programming. We also [â€¦]

[â€¦] is recommended to have knowledge of the C Loops, and Arithmetic Operators to better understand the program. We have already covered these topics in earlier posts, Please go [â€¦]

[â€¦] Arithmetic Operators in C Language [â€¦]

[â€¦] Arithmetic Operators in C language [â€¦]