operators in C
And now we will discuss about operators in C.
Generally we have three types of operator
1 Unary operator
2 Binary operator
3 Ternary operator or conditional operator
Unary operator
Unary operators are used only single operands
For example (), [] , {} etc.
Binary operator
Binary operator need two operands For example addition ,subtraction, multiplication etc.
Ternary operator
This operator need three operands to work one is condiction and two are expresion. We will deeply study while we make some programs on it.
Arithmetic operators
Arithmetic operators are you to perform any mathematical operation
Like
+
adding
-
subtracting
*
multiply
/
divide
%
finding remainder.{10%3=1(remainder)}
there all are arithmetic operator type of binary operater.
Relational operators
From it’s come in the name of operator this operator show any relation between two operands.
<
less then
>
greater then
==
equal to
<=
less than equal to
>=
greater than equal to
!=
no equal to
They are also binary operator
Logical operator
We have three kind of logical operator in C.
&
and operator
||
or operator
!
not operater
Sizeof() operator
This operator tell us the size of a data type. We will discuss it later while we may program on operator.