"); //-->
#include "stdio.h" int *memncpy(void *des,void *src,int len) { int i = 0; int *pdes = (char*)des; int *psrc = (char*)src; while (i< len) { pdes[i] = psrc[i]; i++; } return des; } void main(void) { int i; int str[100]; int des[100]; int *des2; for (i =0;i<100; i++) { str[i] = i; } des2 = memcpy(des,str,100); for (i = 0;i<100;i++) { printf("%d",des2[i]); } }
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。