Non-testable
The information in this article is non-testable. However it is really useful to know about for understanding how C works. I would recommend finding alternative sources for learning more about this one, because I don’t fully get it either.
An lvalue is something that has an identity, in other words a memory location you can refer to. An rvalue is a temporary value or literal that usually doesn’t live in a named memory location. So for example,
int x = 10;
int* xptr = &x;
x;
*xptr;In the above statement, x is an lvalue, it has a name and it is stored in named memory. in other words, it has a memory address. The dereference of xptr is also an lvalue, as dereferencing a pointer does not just give you a temporary value but rather an object in memory. 10 on the other hand, is a temporary value that is not stored in memory without x, and is therefore an rvalue.
Historically, an lvalue referred to literally the left side of the assignment operator, and an rvalue referred to the right side of the assignment operator, however today there are some exceptions.