69,369
社区成员
发帖
与我相关
我的任务
分享
/* Test function strcpy() */
#include <stdio.h>
#include <string.h>
int main(void)
{
char str1[30] = "To be or not to be???????";
char str2[21] = "That is the question";
strcpy(str1 , str2);
printf("\n%s\n" , str1);
getchar();
return 0;
}
char str2[20] = "That is the question";//数组越界了,长度应该是21