#include <string.h> // 如果要从数组a复制k个元素到数组b,可以这样做 memcpy(b,a,sizeof(int)*k); 转载于:https://www.cnblogs.com/yspworld/p/10749070.html