Are literal strings and function return values lvalues or rvalues?
问题 Just wonder if a literal string is an lvalue or an rvalue. Are other literals (like int, float, char etc) lvalue or rvalue? Is the return value of a function an lvalue or rvalue? How do you tell the difference? 回答1: string literals are lvalues, but you can't change them rvalue, but if it's a pointer and non-NULL, the object it points to is an lvalue The C standard recognizes the original terms stood for left and right as in L = R ; however, it says to think of lvalue as locator value , which