Lvalues and Rvalues

Lvalue : They are generally left values of expression, and are on the left side of the expression.
Rvalue : They are generally right values of expression, and are on the right side of the expression.


int main()
    //----with simple basic data types---
    int i = 1;
    /* here i is lvalue(left value) and 1 is Rvalue(Right value
    all expressions are evaluated as above, so the value 
    of 1 goes in i (variable)*/
    /* will print 2 because lvalue is incremented by 1,
    you cannot increment the rvalue here. for example :

    this line produce error, because we cannot ++ or -- right values */
    //-----------with pointers------------
    char *p = "ayqm";
    // incremet in the address  of p
    // will produce a, bceause the next memory location will 
    // be pointed and the value, at that address
    char x = *p;
    // incrementing left values (Lvalue)

	return 0;