指针字符串使用在项目中经常设计,以下是字符串使用。通过代码与运行直观感受。2、代码
#include3、vscode运行结果#include char * name = "中国人"; int main(){ name = (char *)malloc(sizeof(char)); printf("请输入姓名:rn"); scanf("%s",name); printf("学生的姓名:%s",name); return 0; }

指针字符串使用在项目中经常设计,以下是字符串使用。通过代码与运行直观感受。2、代码
#include3、vscode运行结果#include char * name = "中国人"; int main(){ name = (char *)malloc(sizeof(char)); printf("请输入姓名:rn"); scanf("%s",name); printf("学生的姓名:%s",name); return 0; }