Assignment Operator in C programming
Assignment operator is used to assign a value to variables typically it is denoted as "=".
int x, y=2,z;
x=5// 5 is assigned to x
z=x+y;
5=x//[syntax error]
x+y=z;//[error]
Note:
- Remeber that only a single variable is allowed in left hand side of assignment operator
- Associativity of assignment operator is from right to left.
Cascading of Assignment Operator:
What's Your Reaction?