title: How do realloc and memcpy work?
body: <p>I have two questions.</p>
  
  <ol>
  <li><p>Do <code>realloc()</code> and <code>memcpy()</code> copy the entries in an array to another in a way faster than just iterating on each element <code>O(N)</code> ? If the answer is yes then what do you think is its complexity ?</p></li>
  <li><p>If the size allocated is smaller than the original size, does <code>realloc()</code> copy the entries to somewhere else or just leave them as they are decreasing the size of the array ?</p></li>
  </ol>