strcpy函数和strncpy函数的参数类型
strcpy参数类型:

strncpy参数类型:

strcpy函数和strncpy函数的区别
从参数类型可以看出strncpy函数比strcpy函数多个参数num,其作用是从源复制的最大字符数。当想只从源复制指定字符时候可以使用。
strcpy函数使用
strcpy函数使用:
int main()
{
char arr1[] = "hello babc";
char arr2[20] = "xxxxxxxxxxxxx";
strcpy(arr2, arr1);//拷贝的时候也会把' '拷贝过去
printf("%s
", arr2);
return 0;
}
strcpy函数使用注意事项:
1.源字符串中必须包含