Assignment operator in C | L- value Error in C programming
Assignment Operator( = ) :
- Assignment operator is used assigning values.in general assignment operator assigns the value of the right hand side operand to Left hand side Operand.
- Assignment operator is binary operator so it must need two operands.
- Assignment operator symbol is = (equal to).
- Assignment operator have two values those are Left-side value also called as L-Value and Right-side Value also called as R-Value.
- It copies R-value into L-value.
- Left-side value of Assignment Operator must be Variable.
- Assignment operator have lowest precedence than all operators except Comma Operator. see full priority table/precedence table
Syntax of Assignment operator :
Example 2 : L – Value Error in C programming
error: lvalue required as left operand of assignment
20 = x ;