我在下面有一个代码,如果运行,scanf将要求char类型值.正如您所看到的,代码没有for循环或执行while,但是如果插入了值,则只要值为char类型,代码就会重新运行.希望有人可以帮忙:)
#include <stdio.h>
main(){
char name;
clrscr();
printf("welcome who?\n->");
scanf("%s",&name);
getche();
return 0;
}
Run Code Online (Sandbox Code Playgroud) c ×1