怎么弄呀
#include<stdio.h>main(){
char * name;
printf("%s","please input your name:");
scanf("%s",name);
printf("hello,%s! \n",name);
}
在TURBO C下,HELLO后面总输不出字符串
系统报错NON POINTER ASSIGNMENT
该怎么修改
谢谢
printf("%s","please input your name:");
改称
printf("please input your name:");
最总要的是输入是应用字符数组,因为C并没有给字符指针开辟用于存串的内存.