OPERATOR IN C:
An Operator is a symbol which operates on variables. * is a operator It will multiplies the both operands.There are some operators in c
Arithmetic Operator :
Arithmetic operator will performs mathematical operations such as addition,subtraction,multiplication,division and modules.
An Operator is a symbol which operates on variables. * is a operator It will multiplies the both operands.There are some operators in c
- Arithmetic operator
- Assignment operator
- Relational operator
- Logical operator
- Bit wise operator
- Conditional operator or Ternary operator
- Increment and Decrement operator
- Special operator
Arithmetic Operator :
Arithmetic operator will performs mathematical operations such as addition,subtraction,multiplication,division and modules.
Operator
|
Description
|
example
|
+
|
It will add two operands
|
A+B=C
|
-
|
It will subtracts second operand from the first operand
|
A-B=D
|
*
|
It will multiplies both operands
|
A*B=C
|
/
|
It divides numerator by de-numerator
|
B/A=C
|
%
|
The Modulus operator and remainder of after an integer division
|
B%A=2
|
++
|
It is a increment operator to increase the integer value by one
|
A=A+1
|
--
|
It is a decrement operator it will decreases the integer value by one
|
A=A-1
|