C has mainly three operator(according to operands) i.e. Unary,Binary and ternary operator. Unary Operator:- Unary Operator are those ope...
C has mainly three operator(according to operands) i.e. Unary,Binary and ternary operator.
Unary Operator:-Unary Operator are those operator which operate on 1 operand like/example a++,++a,--b etc.Those letter are written in green are called operand and in blue called as Operator.
Binary Operator:-Binary Operator are those operator which operate on 2 operands like a+b,a-b etc.
Ternary Operator:-Ternary Operator are those operator which operate on 3 operands,example '?:'.
According to functioning, C operator are divided into 8 parts:-
1)Arithmetic Operator:-Arithmetic Operator like +,-,*,/,%.
2)Relational Operator:-Relational Operator like >,<,>=,<=,==,!=.
3)Logical Operator:-Logical Operator like &&(AND),||(OR),!(NOT).
4)Assignment and compound Assignment Operator:-Assignment like-
a=88,b=77 etc.(those operator which assign value)
and compound Assignment Operator like +=,-=,*=,/=,%= etc.
5)Increment and Decrement Operator:-Increment Operator like ++(in post fix and prefix) and Decrement Operator like --(in post fix and prefix).
6)Conditional Operator:-Conditional Operator like exp 1?exp 2:exp 3 or c=(a>b)?a:b
7)Bitwise Operator:-Bit wise Operator is a set of bit manipulation operator,in which some are ~(1's complement),&(AND),|(OR),<<,>>.
8)Special Operator:-Special Operator like Sizeof operator.
Unary Operator:-Unary Operator are those operator which operate on 1 operand like/example a++,++a,--b etc.Those letter are written in green are called operand and in blue called as Operator.
Binary Operator:-Binary Operator are those operator which operate on 2 operands like a+b,a-b etc.
Ternary Operator:-Ternary Operator are those operator which operate on 3 operands,example '?:'.
According to functioning, C operator are divided into 8 parts:-
1)Arithmetic Operator:-Arithmetic Operator like +,-,*,/,%.
2)Relational Operator:-Relational Operator like >,<,>=,<=,==,!=.
3)Logical Operator:-Logical Operator like &&(AND),||(OR),!(NOT).
4)Assignment and compound Assignment Operator:-Assignment like-
a=88,b=77 etc.(those operator which assign value)
and compound Assignment Operator like +=,-=,*=,/=,%= etc.
5)Increment and Decrement Operator:-Increment Operator like ++(in post fix and prefix) and Decrement Operator like --(in post fix and prefix).
6)Conditional Operator:-Conditional Operator like exp 1?exp 2:exp 3 or c=(a>b)?a:b
7)Bitwise Operator:-Bit wise Operator is a set of bit manipulation operator,in which some are ~(1's complement),&(AND),|(OR),<<,>>.
8)Special Operator:-Special Operator like Sizeof operator.
If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.
COMMENTS