C库函数 memcpy()

Python/Java学习交流群:369606713


C库函数 memcpy()

#include <stdio.h>

#include <string.h>



int main () {

   const char src[50] = "https://www.codingdict.com";

   char dest[50];



   printf("Before memcpy dest = %s\n", dest);

   memcpy(dest, src, strlen(src)+1);

   printf("After memcpy dest = %s\n", dest);



   return(0);

}