An lvalue is a value that can be assigned to:
lvalue = rvalue;
It’s short for “left value” or “lefthand value” and it’s basically just the value on the left of the =
sign, i.e. the value you assign something to.
As an example of what is not an lvalue (i.e rvalue only):
printf("Hello, world!\n") = 100; // WTF?
That code doesn’t work because printf()
(a function that returns an int
) cannot be an lvalue, only an rvalue.