title: Why point to memory location one past the last element in an array or vector?
body: <p>Suppose we have an array named <code>data</code> of size <code>5</code>. If we pass this array as an argument to <code>std::end</code> function like</p>
  
  <pre><code>int *ptr = std::end(data);
  </code></pre>
  
  <p>It will return a pointer pointing to the memory location <strong>one past the last element</strong> in the array.</p>
  
  <p><strong>Question</strong></p>
  
  <p>What's the point of having a pointer pointing to the memory location one past the last element in the array? Why not just point to the last element in the array?</p>