Answered Questions

  • Array is an lvalue or not?

    An lvalue was defined as an expression to which a value can be assigned. Is an array an expression to which we can assign a value? The answer to this question is no, because an array is composed of several separate array elements that cannot be treated as a whole for assignment purposes. The following statement is therefore illegal: int x[5], y[5]; x = y; Additionally, you might want to copy the whole...

    jbode

    • Nov 30th, 2010

     Per the C Language Standard (hoping the posting software doesn't munge the following so that it's completely unreadable): ---------------------6.3.2.1 Lvalues, arrays, and function desig...