如果在字符数组名前加上取地址符&,会发生什么?
我测试了一下加和不加结果一样啊
程序1:#include<stdio.h>
int main(void)
{
char str[80];
scanf("%s",&str);
printf("%s",str);
printf("%s","Hello");
return 0;
}
程序2:#include<stdio.h>
int main(void)
{
char str[80];
scanf("%s",str);
printf("%s",str);
printf("%s","Hello");
return 0;
}
求大牛详述 为什么网上说不能在字符数组名前加上取地址符&