Friday, February 11, 2011

Operator in C Programming Language.

C has many built in Operator. There are four main operators in c Programming Language.
    Arithmetic Operator
    Relational Operator
    Logical Operator
     Bitwise Operator

But there are some special Operators, such as Assignment Operator Conditional Operator Unary Operator etc.
General form
Assignment Operator:  The Operator who assigns a value or expression called Assignment Operator
General form of Assignment Operator
Variable_name= expression

 Single Assignment: If we assign only one variable to a value is called Single Assignment.
Y=z; etc.
Multiple Assignments: If we assign many variable to a value is called Multiple Assignment.
Example: x=y=z=5;
A=b=c=Pi; etc.
Compound Assignment: If we assign a statement to a value is called Compound Assignment.
Example: x=y+5;
x=x+5; it also can be written as x+=5;
x=x-5; it also can be written as x-=5; etc.

0 comments em “Operator in C Programming Language.”

Post a Comment

Give your valuable Comment...


Programming, Data Structures & Algorithms Copyright © 2011 -- Template created by JAK -- Powered by Blogger