In the previous chapter we have learnt about basic concept of Variables and Constants, In this chapter we are going to learn about the OPERATORS AND EXPRESSION in C Programming.
OPERATORS
In Computer programming operator is a symbol which performs specific action on its operands and gives desired output.
Example:
“a + b”, Here a and be are the operands and “+” is the operator which perform specific action. i.e Addition of two operand value.
Expression:
An expression in a programming language like C is the combination of variable, constants, operators and functions which computes to yield output.
Example: a+b, 7+3 a+5 etc
Based on the number of operand used for an operator it is classified into three categories:
 unary operator
 binary operator
 ternary operator
Depending upon the type of operations to be performed by the operators, it can be classified into following categories:
 arithmetic operator
 assignment operator
 relational operator
 Logical operator
 conditional operator
 increment and decrement operator
 comma operator
 sizeof operator
 bitwise operator
Arithmetic operators:
Arithmetic operators are used to perform arithmetic operation like addition, subtraction, product etc.
Unary arithmetic operator:
This operator require only one operand to perform arithmetic operation and yield output.
Example: +p q
Here p and q are operand + and – are unary operators which are changing the sign of operand p and q respectively.
Note: unary operators are different from binary + and – operator.
Binary operator:
Those arithmetic operators which require two operand to perform arithmetic operation is called binary arithmetic operators.
Binary arithmetic operators are of following types:
OPERATOR  USING PURPOSE 

+  Addition 
–  Subtraction 
%  to get remainder 
/  Division 
*  multiplication 
Note:
In arithmetic integer if the numerator or denominator sign varies from each other in that situation result is implantation dependent.
Modulus operator (%) must not be used with floating point numbers (float, double, long double) because there is no exponent operator in C, but there is a library function pow() which can carry out these type of operation.
/* THIS PROGRAM MAKE YOU UNDERSTAND ABOUT THE ARITHMETIC INTEGER OPERATION */
1 2 3 4 5 6 7 8 9 10 11 12 13 
#include int main() { int num1,num2; //num1,num2 variables for storing two integer number printf("enter two integer number\n"); scanf("%d %d",&num1,&num2); //taking input from user printf("addition=%d\n",num1+num2); //displaying addition printf("subtraction=%d\n",num1num2); //displaying subtraction printf("multiplication=%d\n",num1*num2); //displaying multiplication printf("quotient=%d\n",num1/num2); //displaying quotient printf("remainder=%d\n",num1%num2); //displaying remainder return 0; } 
output:
1 2 3 4 5 6 7 8 9 10 
enter two integer number 6 2 addition=8 subtraction=4 multiplication=12 quotient=3 remainder=0  Process exited after 5.025 seconds with return value 0 Press any key to continue . . . 
/* THIS PROGRAM MAKE YOU UNDERSTAND ABOUT FLOATING POINT ARITHMETIC OPERATION*/
1 2 3 4 5 6 7 8 9 10 11 12 
#include int main() { float num1,num2; printf("enter two floating point number\n"); scanf("%f %f",&num1,&num2); //reading input from user printf("addition=%f\n",num1+num2); //displaying addition printf("subtraction=%f\n",num1num2); //displaying subtraction printf("product=%f\n",num1*num2); //dispplaying multiplication printf("quotient=%f\n",num1/num2); //displaying quotient return 0; } 
output:
1 2 3 4 5 6 7 8 9 
enter two floating point number 6.6 3.4 addition=10.000000 subtraction=3.200000 product=22.440001 quotient=1.941176  Process exited after 7.463 seconds with return value 0 Press any key to continue . . . 
in the above code we don’t considered modulus operation because it cannot be operated with floating point number(as discussed above).
If any one of the input given by user will be of integer type in that case also result will be of floating type:
eg.
Click here for more related tutorials.


Thanx!!