An operator is a special symbol that performs specific operation on operands.
For example int a=10
Int b=a+20;
Here a and 20 are operands and + is the operator
performing Addition operation.
Note:
Operands may be variables or constants on which operator performs operations.
Types of operators
In C operators can be classified into various
categories based on their usage they are as follows
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Assignment operator
- Conditional operator
- Size of Operator
- Bitwise Operators.
Arithmetic Operators can be used to perform
mathematical calculations .These operators re categorized into Two types they
are as follows
- Binary arithmetic operators
- Unary arithmetic operators
Binary arithmetic operators
Binary Operators are those Operators it requires two
operands to perform operation. Generally these operators are categorized into 5
types as shown below
Operator
|
Meaning
|
Example
|
+
|
Addition
|
a+b
|
-
|
Subtraction
|
a-b
|
*
|
Multiplication
|
a*b
|
%
|
Modulo
|
a%b
|
/
|
Division
|
a/b
|
%
|
Modulo
|
a%b
|


06:11
Unknown
0 comments:
Post a Comment