一个字符串的问题
#include<stdio.h>
int main(void)
{
char *s;
scanf ("%s",s);
printf ("%s",s);
getch();
return 0;
}
很简单的字符串输入输出
为什么在DEV-C++里运行输入后就显示程序错误
而WIN-TC里则可以运行....
想不通...请教
#include<stdio.h>
int main(void)
{
char *s;
scanf ("%s",s);
printf ("%s",s);
getch();
return 0;
}
很简单的字符串输入输出
为什么在DEV-C++里运行输入后就显示程序错误
而WIN-TC里则可以运行....
想不通...请教
[此贴子已经被作者于2007-10-30 20:47:51编辑过]