← 返回列表

C库函数 memmove()

C库函数 memmove() #include <stdio.h> #include <string.h> int main () { char dest[] = "oldstring"; const char src[] = "newstring"; printf("Before memmove dest = %s, src='/uploads/android/2019/1102/22/15727057994447.jpg' >\n", dest, src); memmove(dest, src, 9); printf("After memmove dest = %s, src='/uploads/android/2019/1102/22/15727057997546.jpg' >\n", dest, src); return(0); }

C库函数 memmove()

#include <stdio.h>

#include <string.h>



int main () {

   char dest[] = "oldstring";

   const char src[]  = "newstring";



   printf("Before memmove dest = %s,  src='/uploads/android/2019/1102/22/15727057994447.jpg' >\n", dest, src);

   memmove(dest, src, 9);

   printf("After memmove dest = %s,  src='/uploads/android/2019/1102/22/15727057997546.jpg' >\n", dest, src);



   return(0);

}

打开资源 ↗

交流与评论