l-values(left, literal meaning) appear on the lhs of a statement, and r-values vice versa. Essentially, l-values are identifiers. The memory location that will be thereby allocated can vary for r-values. Put in short, all l-values are r-values but not all r-values are l-values.
And ++x++, will cause a compiler error saying "non-lvalue in increment", if x is predefined. This means lvalues cannot be modified as such, like const ones. On Fri, Jun 29, 2012 at 4:28 PM, vindhya chhabra <vindhyachha...@gmail.com>wrote: > please someone explain lvalue and rvalue with example... > for llvalue..please explain ++x++ also.. > thanks. > > -- > Vindhya Chhabra > > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.