程序中途崩溃scanf()字符串的获取
#include <stdio.h>int main (void)
{
char address, name;
printf ("Please enter a address.\n");
scanf ("%c", address);
printf ("Please enter your name.\n");
scanf ("%c", name);
printf ("Your address is %c,your name is %c", address, name);
return 0;
}
结果: