int a[10]; int b[10]; a = b; // illegal typedef struct { int real; int imag; } complex; complex c,d; c = d; //legal
[I realize that
An array name is a const pointer so you can't change what it is pointing to.
Assuming that you meant c = d on the last line is legal, it's simply copying a non-const variable to another non-const variable, which is perfectly legal.