变量和scanf问题
想输出用户输入的名字,但不会写,这是目前我的代码,求大佬改一下int main()
{
char usr_name;
printf("您好,您是?\n");
scanf("%s", usr_name);
printf("您好,%s!", usr_name) 部分代码 int main()
{
char usr_name;
printf("您好,您是?\n");
scanf("%s", usr_name);
printf("您好,%s!", usr_name) #include <cstdio>
int main()
{
char usr_name;
printf("您好,您是?\n");
scanf("%s", usr_name);
printf("您好,%s!", usr_name);
return 0;
}
页:
[1]