title: Does memcpy() uses realloc()?
body: <pre><code>#inlcude &lt;stdio.h&gt;
  #inlcude &lt;stdlib.h&gt;
  #inlcude &lt;string.h&gt;
  
  int main() {
      char *buff = (char*)malloc(sizeof(char) * 5);
      char *str = "abcdefghijklmnopqrstuvwxyz";
  
      memcpy (buff, str, strlen(str));
  
      while(*buff) {
          printf("%c" , *buff++);
      }
  
      printf("\n");
  
      return 0;
  }
  </code></pre>
  
  <p>this code prints the whole string "abc...xyz". but "buff" has no enough memory to hold that string. how memcpy() works? does it use realloc() ?</p>