Arithmetic operator
C supports all the basic arithmetic operators. The following table shows all the basic arithmetic operators.
Arithmetic operators S.No Operators Descriptions 1 + adds two operands
Syntax
int a,b;
a=10;
b=20;
printf("%d", a+b);
2 - Subtract two operands
Syntax
int a,b;
a=20;
b=10;
printf("%d", a-b);
3 * Multiply the two operands
Syntax
int a,b;
a=10;
b=20;
printf("%d", a*b);
4 / Divide numerator by denominator
Syntax
int a,b;
a=10;
b=20;
printf("%d", a/b);//print 0
5 % remainder of Division
Syntax
int a,b;
a=20;
b=10;
printf("%d", a%b);//print 0
6 ^ Power Operator
Syntax
int a,b;
a=2;
b=3;
printf("%d", a^b);//print 8
Practical Video
pirority of Arthimetic operators(Higher to lower):^,%,/,*,+,-
Arithmetic Operators
December 19, 2019
0
We you have any doubt let me know :)