An operators is a symbol that tells the computer to perform certain mathematical or logical manipulations. In C there are large number of operators.
TYPES OF OPERATORS….
+= (Simple Assignment (i=i+1) in Shorthand(i+=1)
*= (Simple Assignment (i=i*m-k) in Shorthand(i*=m-k)
%= (Simple Assignment (i=i%m) in Shorthand(i%=m)
Less than equals to(<=)
Greater than equal to(>=)
Arithmetic Operator------Arithmetic operator are the simplest and basic operator do arithmetic operations. These operator require two variable and are called binary operator.
Here a and b are operand and + is the operator. Operand may be a variable, a constant or an expression etc.
Assignment Operator-----Assignment Operator are used to assign the result of an expression to a variable.
= is the assignment operator(Simple)
This is the shorthand assignment operator, meanings are same.
Relational Operator------Relational operator are used to compare two values. The word relation means relationship between two variable or more.
printf(”a is greater”);
Logical Operator----Logical Operator are used for logical operations. In this operator we use truth table for calculation.
IstValue is true IIndvalue is true IstValue||IInd value=True
IstValue is true IIndvalue is false IstValue||IInd value=True
IstValue is false IIndvalue is true IstValue||IInd value=True
IstValue is false IIndvalue is false IstValue||IInd value=false
IstValue is true IIndvalue is true IstValue&&IInd value=True
IstValue is true IIndvalue is false IstValue&&IInd value=false
IstValue is false IIndvalue is true IstValue&&IInd value=false
IstValue is false IIndvalue is false IstValue&&IInd value=false
Negative change into positive
Positive change into negative
Increment/decrement Operator----Increment or decrement operator is also called urnary operato because in this we use only one operand.
Conditional Operator------Conditional Operator is used to carry out conditional operations. It can be used instead of if-else statement.
Expression1?Expression 2:Expression 3;
Expression------An expression is a combination of operand & operator s. It is the combination of two or more than two operands with an operator or many operators.
Arithmetic expression Mathmetic Expression
(v-p)/(t+w) change into mathmetical v-p v-p
Bitwise Operator-----Bitwise operations are the testing, setting or shifting of the actual bits in a byte or word. Bitwise Operation should not be of float or double type. To understand these operators, we first need to understand the basic of binary number system.
Output is….1011(lower to upper)