Can an array be an lvalue? Ans. 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; You could, however, use a for loop to iterate through each element of the array and assign values individually, such as in this example: int i; int x[5]; int y[5]; ... for (i=0; i - Study24x7
Social learning Network
14 Mar 2023 10:20 AM study24x7 study24x7

Can an array be an lvalue? Ans. 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 ther...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles