title: Equality & assignment operators used on arrays in C++
body: <p>I was given a homework question that really confuses me.  The question is:</p>
  
  <blockquote>
    <p>In C++ the equality test == may be
    applied to arrays, but the assignment
    operator = cannot be applied to
    arrays. Explain why.</p>
  </blockquote>
  
  <p>This confuses me, because my understanding is that the <code>==</code> operator would just compare the addresses of the first two elements (which if two arrays were in fact held in separate memory locations, of course would be different).  And the <code>=</code> operator, when used like <code>array1 = array2;</code> would just cause array1 to point to the same memory location as array2 does.</p>
  
  <p>What am I missing here?  It seems as though either operator can be used, but neither would produce the results typically intended by those operators.</p>