int main(void)
{
char name1[5];
int count;
printf("Please enter names\n");
count = scanf("%s",name1);
printf("You entered name1 %s\n",name1);
return 0;
}
当我输入超过 5 个字符时,它会打印我输入的字符,超过 5 个,但 char 数组声明为:
char name1[5];
为什么会这样