Monday, November 22, 2010

Assignment Operator

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.
Example:  
X=5;
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 “Assignment Operator”

Post a Comment

Give your valuable Comment...

 

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