Operator-
An operator is symbol which
used to operate variables and data.
Operator symbols helps to the users for applying the commonds to complete mathematical manipulations.
C has many operators--
1 Arithmatic operator
2 Relational operator
3 Logic operator
4 Assignment operator
5 Increment &decrement operator
6 Bitwise operator
1.Arithmetic operator-:
In this operator mostly mathematical symbols like plus, minus etc.
Ex.
Operator work of operator
+ For addition
- For subtraction
* For multiplication
/ For division
% (modulo) for find reminder
2.Relational operator-:
These types of operator shows the relationship among to the functions.
Operator work of operator
< is less than
<= is less than or equal to
> is greater than
>= is greater than or equal to
== is equal to
!= is not equal to
3.Logic operator-:
Operator work of operator
&& logic AND
|| logic OR
! logic NOT
4. Assignment operator-:
Operator work of operator
= for assign a value
*= multiply and assign
/= divide and assign
%= moduls and assign
+= add and assign
-= substrct and assign
5.Increment and Decrement operator-:
Operator work of operator
++ increment
-- decrement
6.Bitwise operator-:
Operator work of operator
& AND
| Inclusive OR
^ Exclusive OR
<< Shift left
>> Shift right
~ One's compliment
No comments:
Post a Comment