Arithmetic Operators
The fundamental arithmetic operators and their corresponding symbols in C are:
- Addition +
- Subtraction -
- Multiplication *
- Division /
- Modulus %
When the / operator is used to participate in integer division the resulting integer
is obtained through discarding (or truncating) the fractional a part of the precise
floating point value.
is obtained through discarding (or truncating) the fractional a part of the precise
floating point value.
For illustration:
1/2=0
3/2=1
Increment & Decrement operators
Increment operator ++ adds 1 to its operand
Decrement operator __ subtracts 1 from its operand
it are two types
- pre increment / Decrement
- post increment / Decrement
No comments:
Post a Comment